Google terms of service issue while running tests on chrome on android

1,610 views
Skip to first unread message

Sam Tho G

unread,
Feb 9, 2014, 2:07:51 AM2/9/14
to appium-...@googlegroups.com
Hi,
I was trying to run some tests on chrome on Android using appium.
I was able to launch chrome browser on the device successfully using the new chromedriver version 2.9.
However, after launching the chrome browser, it always shows up the "Google Chrome Terms of Service" page which has the Accept and Continue button on it.
Even though I accept it multiple times, this window turns up every time I run the test.
Has anyone faced this issue?


Thanks in advance,
Sam

Jonathan Lipps

unread,
Feb 10, 2014, 1:41:07 PM2/10/14
to Sam Tho G, appium-...@googlegroups.com
If Chromedriver launches Chrome, it should launch it in a mode where this doesn't pop up.

How are you starting the session?

--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Sam Tho G

unread,
Feb 10, 2014, 3:49:34 PM2/10/14
to appium-...@googlegroups.com, Sam Tho G
Hi Jonathan,
Am starting appium with command "node ."
Below is my code foe setting capabilities and starting the driver.

        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("device", "Android");
        capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
        capabilities.setCapability("app", "chrome");

        WebDriver wd = new RemoteWebDriver(new URL("http://localhost:4723/wd/hub"),
                capabilities);

Below is the output from console:

info: Welcome to Appium v0.15.0 (REV a7b47d73a27074cc928cc5b325e5d4de1b6e5594)
info: Appium REST http interface listener started on 0.0.0.0:4723
   info  - socket.io started
info: Not spawning instruments force-quit watcher since it only works on 10.9 and you have 10.8.5
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Mac","app":"chrome","device":"Android"}}
info: Looks like we want chrome on android
info: Creating new appium session 015e8f7c-a20f-4c9b-98b7-801b97ac6e17
info: Ensuring Chromedriver exists
debug: Pushing unlock helper app to device...
debug: executing: adb install /Users/sam/Documents/Automation/Infrastructure/appium_software/appium/build/unlock_apk/unlock_apk-debug.apk
debug: executing: adb shell "dumpsys window"
info: Writing dumpsys output to /Users/sam/Documents/Automation/Infrastructure/appium_software/appium/.dumpsys.log
debug: Screen already unlocked, continuing.
info: Killing any old chromedrivers, running: ps -e | grep /Users/sam/Downloads/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/chromedriver | grep -v grep |grep -e '--port=9515$' | awk '{ print $1 }' | xargs kill -15
info: Successfully cleaned up old chromedrivers
info: Spawning chromedriver with: /Users/sam/Downloads/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/chromedriver
info: [CHROMEDRIVER] Starting ChromeDriver (v2.9.248307) on port 9515
info: Creating Chrome session
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/session","method":"POST","json":{"sessionId":null,"desiredCapabilities":{"chromeOptions":{"androidPackage":"com.android.chrome"}}}}
info: Successfully started chrome session
info: Overriding session id with "2bffee8e4a151982e459f496dfa299ad"
info: Device launched! Ready for commands (will time out in 60secs)
info: Appium session started with sessionId 2bffee8e4a151982e459f496dfa299ad
POST /wd/hub/session 303 11793ms - 9b
debug: Appium request initiated at /wd/hub/session/2bffee8e4a151982e459f496dfa299ad
debug: Request received with params: {}
debug: Proxying command to 127.0.0.1:9515
info: Making http request with opts: {"url":"http://127.0.0.1:9515/wd/hub/session/2bffee8e4a151982e459f496dfa299ad","method":"GET"}
debug: Proxied response received with status 200: "{\"sessionId\":\"2bffee8e4a151982e459f496dfa299ad\",\"status\":0,\"value\":{\"acceptSslCerts\":true,\"applicationCacheEnabled\":false,\"browserConnectionEnabled\":false,\"browserName\":\"chrome\",\"chrome\":{},\"cssSelectorsEnabled\":true,\"databaseEnabled\":false,\"handlesAlerts\":true,\"javascriptEnabled\":true,\"locationContextEnabled\":true,\"nativeEvents\":true,\"platform\":\"ANDROID\",\"rotatable\":false,\"takesHeapSnapshot\":true,\"takesScreenshot\":true,\"version\":\"32.0.1700.99\",\"webStorageEnabled\":true}}"
GET /wd/hub/session/2bffee8e4a151982e459f496dfa299ad 200 4ms - 475b

It always launches the browser with this page.
Attaching the snapshot of the page.
Android.png

Gadagoju Santosh

unread,
Feb 11, 2014, 2:07:39 PM2/11/14
to appium-...@googlegroups.com, Sam Tho G
Even am facing the same issue.
Has any one resolved this issue?

Thanks
Santosh

Jonathan Lipps

unread,
Feb 10, 2014, 4:50:09 PM2/10/14
to Sam Tho G, appium-...@googlegroups.com
Dunno then, I'd bring it up with the chromedriver team.

<Android.png>

Khushboo Kaur

unread,
Feb 18, 2014, 4:32:29 AM2/18/14
to appium-...@googlegroups.com
Am also facing this issue. Everytime I launch my tests, Google Chrome Terms and Services page open and it signs in. How can I directly land to browser?

Marina

unread,
Mar 27, 2014, 12:24:05 AM3/27/14
to appium-...@googlegroups.com

I was also facing the same issue. It worked with the following code


        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("device","android");

        capabilities.setCapability("app","chrome");
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
        capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
        capabilities.setCapability(CapabilityType.PLATFORM, "WINDOWS");
        capabilities.setCapability("app-package", "com.android.chrome");
        capabilities.setCapability("app-activity", ".com.google.android.app.chrome.Mains");
        driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);

M Tan

unread,
Apr 1, 2014, 11:18:26 AM4/1/14
to appium-...@googlegroups.com
Update your Chrome on play store, it works for me.

Buddha Tree

unread,
May 6, 2014, 10:08:25 AM5/6/14
to appium-...@googlegroups.com
Hey Marina,

I tried with below provided code but no luck. Any workaround for this solution.

Marina Roche

unread,
May 7, 2014, 2:04:30 PM5/7/14
to Buddha Tree, appium-...@googlegroups.com
I tried re-producing the issue. Earlier when I did not specify the app-package and app-activity parameters it would open the terms and conditions page. After I added the app-package and app-activity parameters it started working and would open the page directly 

Now if I comment out the  app-package and app-activity parameters and run my test it is working and is not showing the terms and conditions page. 

What happens when you run the test with   app-package as "com.android.chrome" and app-activity as "com.google.android.app.chrome.Mains"  - does it still show the terms and conditions page?





--
http://appium.io
---
You received this message because you are subscribed to a topic in the Google Groups "Appium-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/appium-discuss/nukYcSjfG9E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to appium-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Buddha Tree

unread,
May 8, 2014, 4:51:18 AM5/8/14
to Marina Roche, appium-...@googlegroups.com
Hey Marina,

Thanks for quick & prompt response. I tried with code shared by you but no luck. Code is launching chrome browser in Emulator & shows screen - Google Chrome Terms of Service. Any suggestion/solution is welcome.

Code is as follows -
        WebDriver driver = null;

        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("platformName","android");
        capabilities.setCapability("app", "D:\\adt-bundle-windows-x86-20131030\\adt-bundle-windows-x86-20131030\\sdk\\platform-tools\\Chrome.apk");

        capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
        capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
        capabilities.setCapability(CapabilityType.PLATFORM, "WINDOWS");
        capabilities.setCapability("app-package", "com.android.chrome");
        capabilities.setCapability("app-activity", ".com.google.android.app.chrome.Mains");
        driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
        System.out.println("1");
        driver.get("http://twitter.com");
        System.out.println("2");

Error Log shown on Eclipse Console -

Exception in thread "main" org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 58 milliseconds
Build info: version: '2.35.0', revision: 'c916b9d', time: '2013-08-12 15:42:01'
System info: os.name: 'Windows Vista', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_06'
Session ID: 7549ab58-6472-4ed5-85fc-5552ac240f8c
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=WINDOWS, app=D:\adt-bundle-windows-x86-20131030\adt-bundle-windows-x86-20131030\sdk\platform-tools\Chrome.apk, javascriptEnabled=true, browserName=, desired={app=D:\adt-bundle-windows-x86-20131030\adt-bundle-windows-x86-20131030\sdk\platform-tools\Chrome.apk, platform=WINDOWS, platformName=android, browserName=, app-package=com.android.chrome, app-activity=.com.google.android.app.chrome.Mains, version=4.2.2}, version=4.2.2, platformVersion=4.1, databaseEnabled=false, platformName=android, app-package=com.android.chrome, webStorageEnabled=false, app-activity=.com.google.android.app.chrome.Mains, warnings={}, takesScreenshot=true}]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:191)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
    at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:276)
    at TestCases.Chrome_Test2.main(Chrome_Test2.java:39)


Refer attached Chrome.jpg file which has screenshot of Android Emulator

Cheers,
Buddha
Chrome.jpg

Jonathan Lipps

unread,
May 8, 2014, 5:46:57 AM5/8/14
to Buddha Tree, Marina Roche, appium-...@googlegroups.com
This isn't how to use Chrome with Appium.


You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
<Chrome.jpg>

Reply all
Reply to author
Forward
0 new messages