Skip to content

Instantly share code, notes, and snippets.

View leeuwe's full-sized avatar

Elout van Leeuwen leeuwe

View GitHub Profile
@leeuwe
leeuwe / ReadMe.md
Last active December 20, 2023 16:06
Base file to speed up your migration from Robot Framework® SeleniumLibrary to Browser

This is a base file to speed up your migration from Robot Framework® SeleniumLibrary to Browser library. The file contains over 40 SeleniumLibrary keywords and may require adjustment to your specific situation.

You should import this resource file INSTEAD of the SeleniumLibrary, NOT in combination with the SeleniumLibrary.

@leeuwe
leeuwe / jQuery.robot
Created May 25, 2021 21:21 — forked from friendlyfreedom/jQuery.robot
How to use jQuery selector
*** 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)
@leeuwe
leeuwe / Check CSS from Element.robot
Last active August 7, 2021 08:55
This git lets you grab the Computed style
*** Settings ***
Library SeleniumLibrary
*** Keywords ***
Check CSS from element
[Documentation] This keyword only works with xpath and is based on [https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle|getComputedStyle]
... You can use this keyword as follows
... | Check CSS from Element | //path/to/element | style | Expected Value |
... | Check CSS from Element | //h2/div | font-size | 24px |
[Arguments] ${xpath} ${CheckStyle} ${ExpectedComputedStyle}