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

Selecting options from Auto Complete Dropdown using selenium web driver in python

$
0
0

I have to select options from a drop down on a page. I tried the below code but it is showing a syntax error. Can somebody help me with this?

web_element x = driver.find_element_by_xpath('//*[@id="txtSearchPhone"]')Select sel = new Select(x)sel.select_by_value("Iphone")

I tries Web_element, WebElement too. But this is showing syntax error for the very first line.

web_element x = driver.find_element_by_xpath('//*[@id="txtSearchPhone"]')            ^   SyntaxError: invalid syntax

Viewing all articles
Browse latest Browse all 99415

Trending Articles



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