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