I have an existing automated suite for web browser based application on cucumber framework using selenium and java. We are now planning to run the same test scripts for the mobile app of same application.

  1. Is it possible to migrate or extend the existing web-based scripts to appium with limited code changes?

  2. If option 1 is not possible, then will we have to write the entire scripts again using appium parameters or is it possible to use selenium parameters for identifying the elements of click, textbox etc.?

1 Answer 1


If the steps are really the same you could create an abstraction for all the Selenium commands and implement them also for the Appium implementation.

But I guess the mobile version will probably will not be a 100% workflow match with the desktop browser version. Most mobile apps I use are a subset and slimmed down compared to their desktop/browser counterpart (e.g. Meetup, LinkedIn, Slack, etc).

I would probably copy the feature specs and code and implement them again for the mobile version. This way as the two products start to be different over time you do not add extra complexity in your cucumber and test code to handle the difference.

Re-using the locators means the developers need keep the naming of classes and Id's the same. I would contact them, because if the are going to rebuild everything from scratch the naming will be different. Maybe let the developers also implement the cucumber tests from the spec?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.