Is it possible to have same script for Android and iOS apps?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2017
12:57 AM
10-30-2017
12:57 AM
Is it possible to have same script for Android and iOS apps?
Hi,
We have an app developed in android and now we are developing same app in iOS.
Is there any way I can re-use the same scripts for Android and iOS apps?
If so what is the approach?
Solved! Go to Solution.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2017
02:23 AM
10-30-2017
02:23 AM
If your flow is same for both iOS and Android then the best option would be like below,
function test() { testiOSLogin(Aliases.iOS.txtUserName,Aliases.iOS.txtPWD,Aliases.iOS.btnLogin,v_username,v_password); testAndriodLogin(Aliases.Andriod.txtUserName,Aliases.Andriod.txtPWD,Aliases.Andriod.btnLogin,v_username,v_password); }
//common function for login function loginApp(obj_usrName,obj_passWord,objLoginButton,txt_userName,txt_Password) { enterFiled(obj_usrName,txt_userName); enterFiled(obj_passWord,txt_Password); if(objLoginButton.Exists) { objLoginButton.Click(); } //do the necessary check to know the login succesful and return true return true; } //common function for entering function enterFiled(objecttoEnter,value) { if(objecttoEnter.Exists) { objecttoEnter.Keys(value); } }
Thanks
Shankar R
LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com
“You must expect great things from you, before you can do them”