javascript - How to click on an angularjs link using python selenium? -


i have following html multiple links use same class , elements, , i'd click on link has ng-switch-when="next" python selenium.

<a class="ng-scope" ng-switch-when="prev" ng-click="params.page(page.number)" href="">«</a> <a class="ng-scope" ng-switch-when="first" ng-click="params.page(page.number)" href=""><span class="ng-binding" ng-bind="page.number">1</span></a>< <a class="ng-scope" ng-switch-when="next" ng-click="params.page(page.number)" href="">»</a> 

this i've tried, there no response webpage.

driver.find_element_by_xpath("//a[@class='ng-scope'][@ng-switch-when='next']").click() 

i know said tried using css classes should work html provided. if doesn't, please post more of relevant surrounding html can adjust css selector.

driver.find_element_by_css_selector("a[ng-switch-when='next']").click() 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -