How to handle a combobox which when clicked open in new window with list of items(to be clicked) in selenium java ?

+1 vote
Oct 28, 2019 in Selenium by Pavithra
• 130 points
312 views

1 answer to this question.

0 votes
@Pavithra, you can try using following commands to handle a combobox:

WebElement ele = driver.findElement(By.id("cmbLocation"));
ComboBox combo = new ComboBox(ele);
combo.expand();
List<WebElement> lis = ele.findElements(By.className("ListBoxItem"));
lis.get(15).click();
answered Oct 29, 2019 by Abha
• 27,930 points

Related Questions In Selenium

0 votes
2 answers

How to open a browser window in full screen using Selenium WebDriver with C#

Hi , we have inbuilt method Maximize(). driver.Manage().Wind ...READ MORE

answered Sep 5 in Selenium by Sri
• 2,970 points
9,449 views
0 votes
7 answers

How to open a link in new tab of chrome browser using Selenium WebDriver?

Try this once driver.findElement(By.id("id")).sendKeys(Keys.CONT ...READ MORE

answered Sep 5 in Selenium by Sri
• 2,970 points
46,246 views
0 votes
1 answer

How to print text from a list of all web elements with same class name in Selenium?

@Rajni, following test case is somewhat similar ...READ MORE

answered Jun 20, 2019 in Selenium by Avantika
18,736 views
0 votes
1 answer
0 votes
1 answer

Open new tab instead of a new window in Selenium WebDriver

The current version of Selenium do not ...READ MORE

answered Jun 22, 2018 in Selenium by Meci Matt
• 9,460 points
2,023 views
0 votes
1 answer

How to get the HTML source of a webpage using Selenium in Java?

There is a method called getPageSource() in ...READ MORE

answered Jan 10, 2019 in Selenium by Sneha
11,584 views
0 votes
2 answers

How to open a new tab in existing browser window using Javascript Executor?

Hi Meenal, you can use executeScript() method ...READ MORE

answered Jul 22, 2019 in Selenium by Abha
• 27,930 points
3,637 views
0 votes
1 answer

How to create a test case with TestNG in Selenium?

Hey Deepak, to create a Test Case ...READ MORE

answered May 21, 2019 in Selenium by Abha
• 27,930 points
202 views