TODO: short summary
- start Chrome with user profile
- start Chrome with extensions disabled
- start Chrome with "ChromeOptions()"
- TODO: add more examples!!!
TODO: describe the bar minimum needed to execute each example
TODO: short summary
TODO: describe the bar minimum needed to execute each example
# Author: Greg Meece (glmeece) on robotframework.slack.com | |
# start Google Chrome browser with "ChromeOptions" | |
# Assuming both `${URL}` and `${BROWSER}` are defined as Global or Suite variables | |
# depends on "Open Browser to Page" below | |
Open Chrome Browser to Page | |
[Documentation] Opens _Google Chrome_ to a given web page. | |
... For more information on what capabilities that _Google Chrome_ | |
... supports, see [https://sites.google.com/a/chromium.org/chromedriver/capabilities%7Cthis Capabilities & ChromeOptions page]. | |
[Arguments] ${URL} | |
${chrome_options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys | |
Call Method ${chrome_options} add_argument test-type | |
Call Method ${chrome_options} add_argument --disable-extensions | |
Run Keyword If os.sep == '/' Create Webdriver Chrome my_alias chrome_options=${chrome_options} executable_path=/usr/lib/chromium-browser/chromedriver | |
... ELSE Create Webdriver Chrome my_alias chrome_options=${chrome_options} | |
# Maximize Browser Window # doesn't work under XVFB | |
Set Window Size 1200 1000 | |
Go To ${URL} | |
Open Browser to Page | |
[Documentation] Opens one of: | |
... - Google Chrome | |
... - Mozilla Firefox | |
... - Microsoft Internet Explorer | |
... to a given web page. | |
[Arguments] ${URL} | |
Run Keyword If '${BROWSER}' == 'Chrome' Open Chrome Browser to Page ${URL} | |
... ELSE IF '${BROWSER}' == 'Firefox' Open Firefox Browser to Page ${URL} | |
... ELSE IF '${BROWSER}' == 'IE' Open Internet Explorer to Page ${URL} | |
Set Selenium Speed ${DELAY} |
# Author: Hélio Guilherme (helioguilhlerme66) on robotframework.slack.com | |
# start Google Chrome browser with specified user profile | |
${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver | |
${options.add_argument}= Set Variable --user-data-dir=C:\\Users\\<username>\\AppData\\Local\\Google\\Chrome\\User Data\\Default | |
Create WebDriver Chrome chrome_options=${options} |
Collection of examples for
Create Webdriver
Keyword from Robot Framework's Selenium2Library: