Test Google Chrome on Android using WebDriver - java

We have a requirement to test Google Chrome on Android Emulator using WebDriver. I am using WebDriver and I am able to test on default browser by installing Selenium Server on Android Emulator. But when I set desired capabilities as chrome and platform Android using RemoteWebDriver, I am able to start tests but it opens default browser and not chrome. Any ideas!?

This is not yet possible with Android.
Currently you can only run webdriver tests against the apk built by Selenium, which is not the Google Chrome browser.

At GTAC 2013 Ken Kania (a Google Engineer) announced the alpha of the Chrome Driver for Android during his presentation. https://docs.google.com/presentation/d/14xU207jL1aepO_8-WrkEcSIPUscUjak5jtxMaUoMegg/pub?start=false&loop=false#slide=id.gbe6ac7bc_0129
The documentation was recently moved to the following site, it's still spartan
https://sites.google.com/a/chromium.org/chromedriver/getting-started/getting-started---android

I am able to run test on Chrome on android device using Chrome driver. I am using QAF (formerly ISFW) - Selenium Framework and i provided following configuration:
selenium.defaultBrowser=chromeDriver
chrome.aditional.capabilities={"chromeOptions":{"androidPackage":"com.android.chrome"}}
For non ISFW user detailed information is available on Chrome driver wiki page.

Related

Is it possible we can automate Slack and Trello window store applications using “WinAppDriver”?

Facing launch issue of Slack and Trello apps using ‘WinAppDriver’, we have followed below desired capability.
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("app","91750D7E.Slack_3.4.0.0_x64__8she8kybcnzg4\\app!App");
trelloSession = new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities);
trelloSession.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
Thread.sleep(10000);
Environment and version:
Java8
Selenium-Webdriver 3.141.59
WebDriver 1.1.1.3
Appium Java client 7.0.0
Windows10
Multiple processes get generated in task manager if I run this application manually.
Desktop Slack app is developed with cross-platform electron.js framework, but WinAppDriver supports native Windows technologies like WinForms, WPF, Win32.
It is actually possible to automate electron apps with Webdriver.
You need to install Spectron, Chromedriver and use one of the client libraries (WebdriverJS/WebdriverIO)
I suggest you look to the following post to know how to setup project.

Appium: iPhone safari takes more time to execute the same script than Android chrome

I am automating the Mobile web browser on Android and iOS devices.
I am using Page Object model Framework using Java + Appium.
Wrote same script for Chrome and Safari browser.
But Safari takes more time than chrome browser.
For example:
Login scripts takes 5 minutes to finish on Android Chrome.
Login scripts take 40 minutes to finish on iPhone safari
browser.
Even it takes 5 to 10 seconds to perform any kind of manipulation while working iOs devices.
Thank you
I got the solution for the slow execution speed on iPhone safari.
I have faced this issue due to Dependencies.
Previously I was using following dependencies:
Installed Appium Version = 1.8.0
Selenium.version = 3.11.0
Appium Java-Client = 5.0.4
So I have moved following dependencies:
Installed Appium Version = 1.8.0
Selenium.version = 3.9.1
Appium Java-Client = 6.0.0-BETA5
Now test scripts are running very fast on iPhone Safari.
For more information please go through this link Appium - iPhone Safari
Thank you

Can't upgrade Firefox with selenium

Temporarily I upgrade my sofware for automation web test.
I had Selenium 2.41 and Firefox27 working fine. When I try to upgrade the software, there is no problem about Selenium (I can upgrade to the latest release 2.45 and it's working fine with Firefox27) but I can't upgrade to any Firefox version higher than 29...and this is a problem for us.
I tried to run my test but I get this exception at some point:
"Failed to start new browser session, shutdown browser and clear all session data
org.openqa.selenium.server.RemoteCommandException: timed out waiting for window 'null' to appear"
Any idea?
Best regards and thanks
Disclaimer: I'm using Selenium's .NET bindings, not Java. I don't think that will make a difference in this case.
Selenium 2.44 had an issue with Firefox 36, but this was resolved in Selenium 2.45. It's possible that Firefox versions between 29 and 35 might be incompatible with Selenium 2.45, although this is just a guess on my part.
I had an issue with Seleinum 2.45 driving Firefox version 38: when instantiating the Firefox driver with no profile, an instance of Firefox would load and immediately crash to desktop; subsequently another instance would load as normal.
I found that the issue didn't occur when instantiating the Selenium Firefox driver from an existing profile, so my workaround was to create a blank profile, launch Selenium's Firefox driver using a temporary copy of that profile; then at the conclusion of the test, delete the temporary copy.
Try launching the Firefox driver with an existing profile.

Android emulator details not listing in Selenium Server for Selendroid

I am trying a sample project for mobile automation testing in android using selenium.
From the link http://selendroid.io/mobileWeb.html, I have started the selenium standalone server and also started the android emulator.
But the emulator devices is not listing in the supported devices of the selenium server.
when checked the emulator details in the selenium server http://localhost:4444/wd/hub/status
{"status":0,"value":{"supportedApps":[{"appId":"io.selendroid.androiddriver:0.10.0","mainActivity":"io.selendroid.androiddriver.WebViewActivity","basePackage":"io.selendroid.androiddriver"},{"appId":"org.openqa.selenium.android.app:","mainActivity":"org.openqa.selenium.android.app.MainActivity","basePackage":"org.openqa.selenium.android.app"}],"os":{"arch":"x86","name":"Windows 7","version":"6.1"},"build":{"browserName":"selendroid","version":"0.10.0"},"supportedDevices":[]}}
supportedDevices":[]
The supported Devices is listing as empty even after adding the emulator specified from the link http://www.abodeqa.com/2013/05/08/configuring-android-webdriver-in-eclipse/.
How to attach and list the android emulator to the selenium server.
Any suggestions will be greatly helpful.

FireFox is very slow in selenium webdriver

When ever i try to automate my application in firefox its taking so much time to load and finally showing "The Connection had Timed Out",and the same app is working perfectly in IE and Chrome.Is there any way to speed up the FireFox? or any browser level settings to be done?.Im using webDriver 2.37,FF 25.0
Any help is appreciated.
Thanks,
Ajay Talpur
Check this CHANGELOG. Webdriver latest version supports only till Firefox 24. Downgrade your firefox version and you will not see this issue.
Check Proxy settings, as Chrome used IE proxy settings application might have working correct over there. You have to set proxy for Firefox it will not pick it up from IE.

Categories