How to run transporter scripts on Android and iOS?

I am using Protractor + Jasmine + Selenium WebdriverJS to automate angularjs application. I was able to configure and configure a sample script with all of these tools to run on a desktop computer.

Now I want to run the same scripts on a mobile device (IOS and Android) .//

I am looking to use appium to run transporter scripts on iOS and Android. If someone worked on a protractor and appium. Please help me create a sample script.

I am new to all of these tools. Any info on this is really helpful.

+7
protractor appium
source share
3 answers

Have you tried using SauceLabs? I think you can request iOS and Android devices by specifying the platform in the configuration options section.

If you do not want to use SauceLabs, you can look at using the Selenium Grid function. You can get Selenium drivers for iOS and Android and connect them to a centralized Selenium server that runs Protractor scripts, you simply modify seleniumAddress in your configuration file to point to a centralized server.

Basically, you should connect to devices remotely, and the simplest methods are as described above.

+3
source share

at https://github.com/angular/protractor/blob/master/docs/browser-setup.md you can find very detailed information on how to configure appium using protractor for testing on emulators (Android / iOS)

you need to replace the protractor webdriver with the webdriver application. appium webdriver works fine on port 4723. The following code is for android for the angialr web application (there is no apk, a clean website running in the cromebrowser device that must be present)

exports.config = { seleniumAddress: 'http://localhost:4723/wd/hub', //appium specs: [ 'spec.js' ], capabilities: { browserName: 'chrome', 'appium-version': '1.0', platformName: 'Android', platformVersion: '4.4.2', deviceName: 'Android Emulator', }, baseUrl: 'http://yourwebsite.com'), }; 

start appium and run the test with

 protractor yourtest.js 

edit: the ability to adapt to the latest version (race_name must be present for selenium 2.43.x)

+3
source share

just wanted to share that this configuration worked for me against BrowserStack.

 multiCapabilities: [ { platformName: 'iOS', platformVersion: '7.1', browserName: '', app: 'safari', deviceName: 'iPhone Simulator', 'appium-version': "1.4.0", username: '<username>', accessKey: '<key>' } , { platformName: 'Android', platformVersion: '4.4', browserName: 'Browser', deviceName: 'Android Emulator', 'appium-version': "1.4.0", username: '<username>', accessKey: '<key>' } ], 

I found that the other values ​​for platformVersion are different from the ones I posted here, do not work, you will get this error message: "Angular not found ..."

I created a ticket for the protractor team and comment: https://github.com/angular/protractor/issues/2247

0
source share

All Articles