Run same test on different devices

Hi

I am still new for Appium…

What is the best way to write tests for mobile web so i will have to run the test once with different params?
In other words, how can i pass to the test, the capabilities as parameters?

Note, I want to use webdriver.io and also thought about using Mocha.js

Thanks !

Hi,

Were you able to find the solution for your question?

Thanks,
Gopi

@gopilal Hi,

The solution i found so far, is using nightwatchjs and Selenium Grid.
With nightwatch, i can a test and pass as a parameter on which environment it should run. It also support multiple environments. And by using Grid, I am able to run tests in parallel.

as an example, if i want to run same test on both iPad simulator and Android device, i use this command:

nightwatch -t demoTest.js -e ipad_sim,android

Thanks. Have you tried Protractor & selenium grid combo. Is there a specific reason why you choose nightwatch.js?

I am new to webdriver JS binding, so i looked around and found nightwatch works good for my needs.
I tried others, like webdrive.io but gave up on it becuase it didn’t work well and i needed a quick on-boarding.
Protractor seems to be focused on Angular apps, which i don’t use so i haven’t tried it.

Do you think it have an advantage over nightwatch? what is it?