-
-
Save leeuwe/50baeeead700982ca0ac4bd442702981 to your computer and use it in GitHub Desktop.
How to use jQuery selector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Settings *** | |
Library SeleniumLibrary | |
*** Keywords *** | |
Show basic jQuery | |
[Documentation] '.classExample' gebruik je hetzelfde als je css:.classExample gebruikt, | |
... maar met jQuery kan je daar aan toevoegen de hoeveelste match, door dit uit te breiden | |
... met ':eq(hoeveelste voorkomen)' | |
... Dit voorbeeld is geselecteerd als 1, wat betekend het 2e voorkomen (eerste voorkomen is 0, zoals in python gebruikelijk) | |
Click Element jquery:.classExample:eq(1) | |
Show jQuery power in Loop | |
[Documentation] '.classExample' gebruik je hetzelfde als je css:.classExample gebruikt, | |
... maar met jQuery kan je daar aan toevoegen de hoeveelste match, door dit uit te breiden | |
... met ':eq(hoeveelste voorkomen)' | |
FOR ${index} IN RANGE 1 10 | |
${source} Get text jquery:.classExample:eq(${index -1}) | |
END | |
[return] ${source} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment