Collection of usefull stuff (mainly custom keywords) for RF S2L
Created
June 27, 2017 11:22
-
-
Save Tset-Noitamotua/c3ddb211725fe391ef4dc0bd85d700cc to your computer and use it in GitHub Desktop.
Collection of usefull shit for S2L
This file contains 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
Scroll To Div by ID | |
[Documentation] TODO make it work and finish it | |
... | |
execute javascript var element = document.getElementById("s_vctrl_div"); element.scrollIntoView(); | |
This file contains 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
Scroll To Bottom | |
[Documentation] author: glmeece (RF Slack) | |
... | |
Execute JavaScript window.scrollTo(0, document.body.scrollHeight) | |
Sleep 2 |
This file contains 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
Scroll to Element | |
[Documentation] Pass in a recognizable element selector; this keyword | |
... will scroll the pane to make it the top-most element. | |
... Optionally, change the ``vert_offset`` to another value | |
... to control how far "back" you want to scroll from the | |
... element (allows you to see elements above the element). | |
... author: glmeece (RF Slack) | |
... | |
[Arguments] ${the_element} ${vert_offset}=${23} | |
Wait Until Page Contains Element ${the_element} timeout=5 seconds error=*HTML* <span style="color:red;font-weight:bold">φ</span> Scroll to Element:: unable to locate the element '${the_element}' | |
${vert_pos} = Get Vertical Position ${the_element} | |
${horz_pos} = Get Horizontal Position ${the_element} | |
Execute JavaScript window.scrollTo(${horz_pos},${vert_pos} - ${vert_offset}) | |
Sleep .25 seconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment