Automation setup on Ubuntu 14.04:
Robot Framework 2.9.2 (Python 2.7.6 on linux2)
selenium2library-1.7.4
ChromeDriver 2.20.353124
Device under testing: Nexus 7 (KitKat 4.4, Chrome v. 47)
Everything works fine when running this following example test with Python --> URL is launched properly on Chrome in Nexus device.
from selenium import webdriver
capabilities = {
'chromeOptions': {
'androidPackage': 'com.android.chrome',
}
}
driver = webdriver.Remote('http://localhost:9515', capabilities)
driver.get('http://google.com')
driver.quit()
But actual problem exists when I try to get the same working with Robot Framework script. I've tried several ways but always it just opens URL on desktop Chrome browser - not in mobile (Nexus tablet) as it should be.
The following RF script was my latest try. I think problem is related somehow to desired_capabilities but I just haven't find the correct way how it should be defined
*** Settings ***
Library Selenium2Library
*** Variables ***
${chromedriver} http://localhost:9515
${android} = Create List androidPackage com.android.chrome
${desired_capabilities} = Create Dictionary {chromedriver} chromeOptions ${android}
*** Keywords ***
Open Page
Open Browser http://www.google.com
... browser=chrome
... desired_capabilities=${desired_capabilities}
Anyone had same issue? What I'm doing wrong?