For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
Course Name Date Time Duration Type Location
Qtp / UFT withVbscript 26th March 2020 9.00 PM IST to 10:30 PM IST 30 Days WeekDays Online

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Tuesday, February 2, 2016

Get Items From a Listbox using LeanFT Java

//Using Application Model

public void getlistitems() throws GeneralLeanFtException {

 Browser browser = BrowserFactory.launch( BrowserType.CHROME);
 mtoursapplocal mTours= new mtoursapplocal(browser);
 List< listitem> countries = mTours.RegisterPage().CountryListBox().getItems();

 for(ListItem country:countries){

//Using Descriptive Programming
public void getlistitemsDP() throws GeneralLeanFtException {

BrowserDescription mBrowser = new BrowserDescription.Builder().url("http://www.newtours.demoaut.com/mercuryregister.php").build();
Browser browser = BrowserFactory.attach(mBrowser);

ListBox CountryList = browser.describe(ListBox.class,new ListBoxDescription.Builder().tagName("SELECT").name("country").build());
List< listitem> countries = CountryList.getItems();

for(ListItem country:countries){

No comments :

Post a Comment