Eve
Eve

Reputation: 514

Rational Functional Tester dropdownlist select

I'm working on automation project, and I'm trying to select a html dropdown list and the item in the list with JAVA-code (not javascript). Apparently the best way to this is the GuiSubitemTestObject but on constructing the method i can't find any examples. Does anyone have an example.

Upvotes: 0

Views: 2848

Answers (1)

Radek
Radek

Reputation: 11101

SelectGuiSubitemTestObject object_for_select = ((SelectGuiSubitemTestObject) to[0]);
      try {
//      ITestDataList dataList = (ITestDataList)object_for_select.getTestData("list");
//      ITestDataElementList elementList = (ITestDataElementList)dataList.getElements();
//          for(int i = 0; i<elementList.getLength(); i++) {
//        This statement prints the Items of the Listbox or combo box.
//        System.out.println("Item Index  "+i+" "+elementList.getElement(i).getElement().toString());
//      }
    object_for_select.select(what_to_set);
  }

Upvotes: 0

Related Questions