Webtesting Using SauceLabs

262 views
Skip to first unread message

Dan

unread,
Jun 2, 2014, 4:12:24 PM6/2/14
to appium-...@googlegroups.com
I'm trying to run the android emulator with webdriver on saucelabs to test just web pages. This is what I am using for my capabilities:

        Capabilities capabilities = DesiredCapabilities.android()
        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability("platformVersion", "4.2");
        capabilities.setCapability("deviceName", "Android Emulator");
        capabilities.setCapability("deviceType", "phone");
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android")

However this gives me an error:

org.openqa.selenium.WebDriverException: Sauce could not start your job. For more information on what happened, please visit (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 21.74 seconds
All the tutorials I'm finding and answers include capabilities that install an apk, that's not something that I need.

Thanks in advance.

Isaac Murchie

unread,
Jun 2, 2014, 4:13:52 PM6/2/14
to Dan, appium-...@googlegroups.com
Add the capability "appium-version", and set it to 1.0.0 or 1.1.0. By default it is 0.18.x, so the new style capabilities won't work.


--
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/d/optout.

Dan

unread,
Jun 2, 2014, 4:36:50 PM6/2/14
to appium-...@googlegroups.com, dandun...@gmail.com
Thanks for replying. I updated my capabilities to:

        capabilities.setCapability("appium-version", "1.1.0")
        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability("platformVersion", "4.2");
        capabilities.setCapability("deviceName", "Android Emulator");
        capabilities.setCapability("deviceType", "phone");
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android")

but am still getting the same error:
org.openqa.selenium.WebDriverException: Sauce could not start your job. For more information on what happened, please visit (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.75 seconds

Isaac Murchie

unread,
Jun 2, 2014, 4:38:39 PM6/2/14
to Dan, appium-...@googlegroups.com
What is in the Appium server logs?

Dan

unread,
Jun 2, 2014, 4:44:13 PM6/2/14
to appium-...@googlegroups.com, dandun...@gmail.com
There are none. Saucelabs is providing this as the error: Failed to download mobile app: error

Satyajit Malugu

unread,
Jun 2, 2014, 4:44:24 PM6/2/14
to Isaac Murchie, Dan, appium-...@googlegroups.com
This was happening to me for last 2 weeks. We have an enterprise sauce labs support and raised ticket but it went nowhere.

Isaac Murchie

unread,
Jun 2, 2014, 4:45:29 PM6/2/14
to Dan, appium-...@googlegroups.com
Ok. Is the app available and downloadable by Sauce? I don't see any capability set for giving the app in your code.

bootstrap online

unread,
Jun 2, 2014, 4:46:12 PM6/2/14
to Isaac Murchie, Dan, appium-...@googlegroups.com
Are you using the sauce storage api? If not, you should be.

Dan

unread,
Jun 2, 2014, 4:48:28 PM6/2/14
to appium-...@googlegroups.com, dandun...@gmail.com
I am trying to use the browser. There is no app I am trying to install to test. Just a web page. 

Isaac Murchie

unread,
Jun 2, 2014, 4:49:39 PM6/2/14
to Dan, appium-...@googlegroups.com
Ah, I see that now. But "Android" is not a valid browser name.

Dan

unread,
Jun 2, 2014, 4:54:40 PM6/2/14
to appium-...@googlegroups.com, dandun...@gmail.com
Still getting the same error after updating to: 
        capabilities.setCapability("appium-version", "1.1.0")
        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability("platformVersion", "4.2");
        capabilities.setCapability("deviceName", "Android Emulator");
        capabilities.setCapability("deviceType", "phone");
        capabilities.setCapability(CapabilityType.BROWSER_NAME, "Browser")

Isaac Murchie

unread,
Jun 2, 2014, 4:57:05 PM6/2/14
to Dan, appium-...@googlegroups.com
As the docs note, "Note that on 4.4+ devices, you can also use the 'Browser' browserName cap to automate the built-in browser."

Dan

unread,
Jun 2, 2014, 4:59:08 PM6/2/14
to appium-...@googlegroups.com, dandun...@gmail.com
Saucelabs does not support 4.4 yet. Only up to 4.3.

Jonathan Lipps

unread,
Jun 2, 2014, 6:41:18 PM6/2/14
to Dan, appium-...@googlegroups.com
Web testing on Sauce is not currently supported through Appium. Instead, it's supported through AndroidDriver. See the Sauce platforms page for the precise caps you need to get it to work:

Dan

unread,
Jun 3, 2014, 9:24:08 AM6/3/14
to appium-...@googlegroups.com, dandun...@gmail.com
Thanks for the confirmation. I have tried that DesiredCapablities listed on their documents page but it still gives me errors. 

Jonathan Lipps

unread,
Jun 4, 2014, 7:58:16 PM6/4/14
to Dan, appium-...@googlegroups.com
Please open a ticket with Sauce support then, passing in a link to the test that failed when using the capabilities from the Sauce platforms page.

Thanks!

Hutusoru Andrei

unread,
Aug 8, 2014, 5:12:11 AM8/8/14
to appium-...@googlegroups.com, dandun...@gmail.com
Dan, did you talked to Saucelabs support about this?
I am experiencing the same problem on Saucelabs, but locally works fine for me.

Dan

unread,
Aug 8, 2014, 9:07:08 AM8/8/14
to appium-...@googlegroups.com, dandun...@gmail.com
They gave me this:
Capabilities capabilities = DesiredCapabilities.android() 
capabilities.setCapability("platformName", "Linux"); // switched from "Android" 

capabilities.setCapability("platformVersion", "4.2"); 
capabilities.setCapability("deviceName", "Android Emulator"); 
capabilities.setCapability("deviceType", "phone"); 
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");

Try that and see if that works. 

keerthy

unread,
Aug 8, 2014, 6:26:21 PM8/8/14
to appium-...@googlegroups.com, dandun...@gmail.com
I'm getting

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: Chromedriver quit before it was available)

on SauceLabs, when trying to switch From Native to Webview, with below code snippet

Set<String> contextNames = getAppiumWebDriver().getContextHandles();
        for (String contextName : contextNames) {
            System.out.println(contextName);
            if (contextName.contains("WEBVIEW")){
                getAppiumWebDriver().context(contextName);
            }
        }

Support suggested me to change the capability  automationName to Selendroid. But it didn't work.

Any suggestions.
Reply all
Reply to author
Forward
0 new messages