2017-09-19 2 views
-4
<a class="page-link" title="Next page" data-page-number="3" href="/recruiter/smartsearch?searchHistoryId=1702735186&amp;searchCacheKey=1fdcde45-657b-4666-824a-12ab561b3a91%2Cm9d5&amp;searchRequestId=d371cf7e-2703-43de-9fe5-218fad50e152%2C5wG7&amp;searchSessionId=1702735186&amp;linkContext=Controller%3AsmartSearch%2CAction%3Asearch%2CID%3A1702735186&amp;doExplain=false&amp;start=50" rel="next"> 
    <svg aria-hidden="true"> 
     use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#chevron-right-icon" data-size="small"></use></svg><span class="hide-a11y">Go to page 3</span></a> 

J'utilise un appel àSélénium ne peut pas sembler cliquer sur un lien href

driver.find_element_by_css_selector('a[title="Next page"]').click() 

mais retourne une chaîne vide

+1

Veuillez lire [Comment poser une bonne question?] (Https://stackoverflow.com/help/how-to-ask) avant de poser d'autres questions. –

+3

Comment un lien cliquant pourrait vous renvoyer une chaîne vide (ou non vide)? Qu'est-ce que vous voulez exactement que votre script fasse? Décrivez votre problème avec plus de détails (ajoutez le journal d'exception) – Andersson

Répondre

0

Essayez d'utiliser XPath

//a[@title='Next page'] 
+1

Y a-t-il une raison d'utiliser ce XPath au lieu du même sélecteur CSS? – Andersson