Created
January 11, 2017 17:00
-
-
Save aaltat/fb8a99a28953965fe37eae77519fdd23 to your computer and use it in GitHub Desktop.
Register browser in Selenium2Library
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
from selenium import webdriver | |
from robot.libraries.BuiltIn import BuiltIn | |
def open_my_browser(url): | |
# Code here to open browser your my way | |
driver = webdriver.Chrome() | |
# Code here to open browser my way ends | |
driver.get(url) | |
s2l = BuiltIn().get_library_instance('Selenium2Library') | |
s2l._cache.register(driver, None) |
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 foobar.py | |
Library Selenium2Library | |
*** Test Cases *** | |
Example | |
Open My Browser https://www.google.fi/ | |
Selenium2Library.Wait Until Page Contains Google | |
Selenium2Library.Close All Browsers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment