I wanted to test page in Python
Selenium
, which uses AngularJS
. It contains a select option and I have tried a number of options to select it but it fails.
<select id="xtzpp001" ng-model="..." ng-options="...." ng-change="changeView()">
<option value class>select</option>
<option value="200" selected="selected">Student 1</option>
<option value="201">Student 2</option>
<option value="202">Student 3</option>
</select>
As I said, I tried---
driver.find_element_by_xpath('//select[@id="xtzpp001"]/option[contains(text(), "Student 2")]').click()
then
from selenium.webdriver.support.ui import Select
select = Select(driver.find_element_by_id('xtzpp001'))
for i in select.options:
.......etc etc
I used explicit waits also.
I came to know that pytractor can help me in this situation (not being actively developed though), but I am unable to find any documentation regarding select option using pytractor.
Is there any other way to achieve this?? or pytractor equivalent?
Or can I use protractor(or any javascript framework) to continue in testing in Javascript
from this stage and integrate/callback the results in Python
??