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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -