Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have one button from one linkedin page with this code:

<div class="primary-action-button"><a class="primary-action label" href="/requestList?displayProposal=&amp;destID=39959446&amp;creationType=DC&amp;authToken=Yr4_&amp;authType=OUT_OF_NETWORK&amp;trk=vsrp_people_res_pri_act&amp;trkInfo=VSRPsearchId%3A2998448551382744275729%2CVSRPtargetId%3A39959446%2CVSRPcmpt%3Aprimary">Send InMail</a></div>

There's any way to click on a elemente just by href link? Thnaks

share|improve this question

1 Answer

up vote 1 down vote accepted

Using selenium you could use the following code:

driver.findElement(By.linkText("Send InMail")).click();
share|improve this answer
 
I get an error: 'WebDriver' object has no attribute 'findElement' –  Findios 8 hours ago
 
fix it by using .find_element_by_link_text. Thanks. –  Findios 8 hours ago
 
My pleasure @Findios –  Fresh 8 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.