dimanche 29 mai 2016

Scripting on Website - JQuery, Selenium IDE, and javascript clicks don't work

My friend and I like to practice scripting for fun in the javascript console. This one stumped us. Would love your advice.

We were trying to script clicking the "follow" button on THIS URL. You'll need to sign up to try it.

The first thing we tried was:

$( '.btn-white' ).click ();

Which is the most obvious thing. Select for the class. It didn't work. It DID select all the correct buttons. But didn't click.

We then tried using .trigger() still nothing. Also tried mousedown events

We looked into it a bit deeper, saw they were using Handlebars and thought that it might cause issues with the JQuery so wrote the script with javascript instead. The function would run and again select the right buttons, but wouldn't click the button.

Finally, just because we were curious, we downloaded the Selenium Firefox IDE just to see what it would do. It also is unable to click the button. It also runs smoothly, thinking that it clicked everything, but is unable to execute the actual click.

Any idea what the solution to our puzzle is? Or even WHY this is happening? Very curious since we've never seen this before in our exercises.




Aucun commentaire:

Enregistrer un commentaire