0

I need to run my Robot test scripts using portable browsers of specific versions, instead of the one those are installed on the host machine. How can I achieve this? Is there any option available in Selenium Capabilities?

My requirement is for Chrome, IE, and Firefox - all these browser's portable versions.

3 Answers 3

1

You can use the following method to specify the binary file location as an experimental option before calling Create Webdriver keyword.

Call Method ${chromeOptions}    add_experimental_option prefs   ${prefs}
${chromeOptions.binary_location}    Set Variable    <insert your path here>     
Create Webdriver    Chrome  chrome_options=${chromeOptions}
Sign up to request clarification or add additional context in comments.

Comments

1

Can be done this way (same answer as @GPT14, but more complete):

${options}=    Evaluate    sys.modules['selenium.webdriver'].ChromeOptions()    sys, selenium.webdriver
${prefs}       Create Dictionary
Call Method    ${options}    add_experimental_option    prefs    ${prefs}
${options.binary_location}    Set Variable    ${setYourPathToChromePortableHere}
Create Webdriver    Chrome    chrome_options=${options}
Go To    ${URL}

Comments

0

A possibility is to manipulate the PATH environment variable so that it finds the portable browser first that the installed one (and before calling Create Webdriver or Open Browser).

This can be done using OperatingSystem keywords, like for example, Set Environment Variable.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.