Answer the question
In order to leave comments, you need to log in
Finding elements in Selenium
There is no ID or Name in the area of the link I'm interested in. I was thinking of doing an XPath search (typing the full href="and/full/record"). But it turned out that there is a dynamic part (numbers) in href and this will not work (maybe you can put some kind of asterisks or something like that in the place where changing values \u200b\u200b- but I don’t know). I tried to do an XPath search by title, but I can't see it that way... It didn't work out. I decided to do a search by find_element_by_partial_link_text - it also produces some errors. How to find (prescribe) the desired element in such a situation? I'm barely familiar with all of this. Here is an example:
<li class="pageIcon">
<a href="/cpsess3185677916/scripts/command?PFILE=Server_Status" title="Server Status" >
<img src="/cPanel_magic_revision_1399286476/themes/x/icons/serverstatus_v2.gif" alt="Server Status" />
<span>Server Status</span>
</a>
</li>
Answer the question
In order to leave comments, you need to log in
Why didn't xpath contains fit?
for example//a[contains(@href,'command?PFILE=Server_Status')]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question