import resources.parse_table_idHelper;
import com.rational.test.ft.*;
import com.rational.test.ft.object.interfaces.*;
import com.rational.test.ft.object.interfaces.SAP.*;
import com.rational.test.ft.object.interfaces.siebel.*;
import com.rational.test.ft.script.*;
import com.rational.test.ft.value.*;
import com.rational.test.ft.vp.*;
public class parse_table_id extends parse_table_idHelper
{
public void testMain(Object[] args)
{
try {
//Search for html table
TestObject[] foundTables = RationalTestScript.find(
atDescendant(".class", "Html.TABLE", ".id", "my_table"));
if (foundTables.length != 1) throw new Exception("Table not found");
StatelessGuiSubitemTestObject html_table = (StatelessGuiSubitemTestObject)foundTables[0];
// table parsing
ITestDataTable table = (ITestDataTable)html_table.getTestData("contents");
int nbRows = table.getRowCount();
int nbCols = table.getColumnCount();
for (int i=0; i<nbRows; i++) {
for (int j=0; j<nbCols; j++) {
if (table.getCell(i, j) != null) {
TestObject cell = (TestObject)html_table.getSubitem(
atCell(atRow(i), atColumn(j)));
String cellID = (String)cell.getProperty(".id");
if (! cellID.equals("")) {
System.out.println("Cell (" + (int)(i+1) + "," + (int)(j+1) + ") ID : " + cellID);
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
Automate Jenkins with the CLI or the REST API Jenkins is used a lot to automate your build process and make it a real continuous integration process. But you can even take it a step further and automate the configuration of Jenkins itself. In this short instruction I will show two ways to do this: the CLI and the REST API. With these capabilities you can for example write programs to create, backup, restore, start and view Jenkins jobs. Download the Try-it-out-yourself code to provision an Ubuntu VM with Jenkins installed. This way you can immediately try the examples below. The CLI The Jenkins CLI is distributed inside the jenkins.war, but you have to download it before you can use it. Suppose your Jenkins url is: http://localhost:8080/jenkins Then the CLI can be downloaded like this: wget http://localhost:8080/jenkins/jnlpJars/jenkins-cli.jar Note In the remainder of this document I assume the Jenkins url is http://localhost:8080/jenkins. You shoul
How to know ".id" property of an HTML Table. I am not able to find any other property except ".class" of HTML Table.
ReplyDelete