linoskoczek Posted August 11, 2013 Posted August 11, 2013 (edited) Hello!I've got a problem with simulating a click on: <a class="single_like_button btn3-wrap" onclick="openFbLWin_161403();"> <span> </span> <div class="btn3">Retweet</div> </a>I've tried many methods, but none of them worked. Methods were like:$wrong = _FFObjGet("btn3-wrap", "class") _FFObjDelete($wrong) $likegreen = _FFObjGet("btn3-wrap", "class") _FFClick($likegreen)$likegreen = _FFObjGet("single_like_button", "class") _FFClick($likegreen)$likegreen = _FFObjGet("btn3", "class") _FFClick($likegreen)$js = _StringBetween(_FFReadHTML("body"), '<a class="single_like_button btn3-wrap" onclick="', '"') _FFOpenURL($js)Page seem to load this element via Ajax, thats why I gave Sleep(5000) before doing it everything, but didn't helped Any ideas? Greetings. Edited August 11, 2013 by linoskoczek
Danp2 Posted August 12, 2013 Posted August 12, 2013 Instead of using _FFClick, try the following: _FFCmd("FFau3.xpath.onclick()") linoskoczek 1 Latest Webdriver UDF Release Webdriver Wiki FAQs
Solution linoskoczek Posted August 26, 2013 Author Solution Posted August 26, 2013 Already solved it, sory for slow reaction.The mistake was here:$js = _StringBetween(_FFReadHTML("body"), '<a class="single_like_button btn3-wrap" onclick="', '"') _FFOpenURL($js)_StringBetween return value in Array.I made click with _FFDispatchEvent(), with simulating a keyboard click.Anyway thank you for this, I'm sure I will use it in other case when both other metods won't work!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now