2017-02-12 5 views
-2

Ich habe ein Problem mit der Auswahl des Elements mit nur TABINDEX SelektorFinding Element mit tabindex Selektor

<a href="#" tabindex="-1"> 
    <!--template bindings={}--><span><strong>D000002</strong></span> 
    </a> 

es wie folgt aussieht: enter image description here , XPath aus DevTool kopiert: //*[@id="dcr-search-form"]/typeahead-container/ul/li/a/span/strong funktioniert nicht:

query = driver.findElement(By.xpath("//*[@id='dcr-search-form']/typeahead-container/ul/li/a/span/strong")); 

irgendwelche Vorschläge?

Antwort

0

driver.findElement (By.xpath ("// * [@ id = 'dcr-suchformular']/typeahead-container/ul"));

gearbeitet :)