Reputation: 1
I run Robot Framework tests in SauceLabs. After last upgrade of Selenium I receive the error : "desired_capabilities has been deprecated and removed. Please use options to configure browsers as per documentation."
I see that data format of Options structure is different and it doesn't look like Dictionary. Also I already use Options parameter as add_argument("--ignore-certificate-errors").
And previously I added a sauce_options to desired_caps.
Could you help me to combine these configurations in new Options format, please ?
${sauce_options} Create Dictionary name="${PLATFORM_NAME}:${BROWSER} - ${TEST_NAME}"
... tunnelName=XXX
... extendedDebugging=true
... tunnelOwner=XXX
&{desired_caps}= Create Dictionary
IF '${DEVICE}'=='desktop'
Set To Dictionary ${sauce_options} screenResolution=${RESOLUTION}
Set To Dictionary ${desired_caps} browserName=${BROWSER}
... browserVersion=${VERSION}
... platformName=${PLATFORM_NAME}
... **sauce:options=${sauce_options}**
... unhandledPromptBehavior=dismiss
ELSE
Set To Dictionary ${desired_caps} browserName=${BROWSER}
... platformName=${PLATFORM_NAME}
... **sauce:options=${sauce_options}**
... appium:deviceName=${DEVICE_NAME}
... appium:deviceOrientation=portrait
... appium:platformVersion=${VERSION}
... appium:autoDismissAlerts=true
${automation_name} Set Variable If ${iphone}==${TRUE} ${automation.name.ios} ${automation.name.android}
Set To Dictionary ${desired_caps} appium:automationName=${automation_name}
....
# Next keyword
IF '${DEVICE}'=='desktop'
# Desktop
IF '${BROWSER}'!='firefox' and '${BROWSER}'!='MicrosoftEdge'
Open Browser ${url} ${BROWSER} remote_url=${saucelabsUrl} desired_capabilities=${desired_caps}
ELSE '${BROWSER}'=='firefox'
Open Browser ${url} ${BROWSER} remote_url=${saucelabsUrl} desired_capabilities=${desired_caps} options=add_argument("--ignore-certificate-errors")
END
ELSE
# Simulator
Open Browser ${url} ${BROWSER} remote_url=${saucelabsUrl} desired_capabilities=${desired_caps}
END
I expect to run Open Browser Keyword on desktop and mobile depending on $DEVICE variable
Upvotes: 0
Views: 92