'how to use a chrome profile with robot framework test
I tried a lot of things and none of them worked. Here is my code in Robot Framework:
*** Settings ***
Library SeleniumLibrary
Library OperatingSystem
Library String
Suite Teardown Run Keyword tear_down_actions
*** Keywords ***
tear_down_actions
Close All Browsers
*** Variables ***
${browser} chrome
${testURL} https://www.google.com
${chrome_options} add_argument("--user-data-dir=C:/Users/test/AppData/Local/Google/Chrome/User Data/Profile 1")
*** Test Cases ***
Test 1
Open Browser ${testURL} ${browser} ${chrome_options}
Go To chrome://version
Everytime I run this, a new profile directory is created under AppData\Local\Temp\scoped...\Default
Any help is appreciated.
Edit: I tried add_argument with --incognito and it works. meaning "add_argument" is the correct use.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
