Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98819

Selecting element from drop down list using selenium web driver

$
0
0

I want to select element from drop down list but in html they have used <img> tag. How can I achieve my goal?

This is stuff from my code:

public void country() {    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);    Select country1 = new Select(country);    country1.selectByVisibleText("Canada");}

I am getting this error while running testNg test

org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been "select" but was "img"


Viewing all articles
Browse latest Browse all 98819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>