How to use the single script designed in uipath to run in multiple browsers?
I will pass the browser variable in datasheet and it should run in that browser.
2.The selector content for each browser seems to change as a prefix is added in selector with the browser name
3.The selector of the web elements are changing with browser. How to get a uniform selector for each browser.
Finally is it really feasible and easy to use uipath for cross browser Testing?
@Pranav_Jalan@Ahilesh Regarding the first two points:
I made an excel sheet with a column named browser and added values like chrome.exe, msedge.exe in different rows.
Then I created two If statements in my sequence for Open Browser one for chrome and another for edge by checking the value in the excel row. for eg if excel row had value chrome.exe then open chrome browser.
Then I used variable in selectors for any UI activity eg app=‘chrome.exe’ to app=‘{{browserArgument}}’ and passed value to this argument regarding which browser it is.
Lastly I created a data driven test case and added the workfile to it and excel file as test data, and after assigning arguments to the workfile from data set This works fine.
And regarding your 3rd point I found that if you make your selectors more unique to the html like in ui explorer selecting those html tags which would make it a unique selector i.e. removing idx (in my case having idx was also working fine, but i did not used id as a selector instead i used innertext and multiple html tags as those will be same for all browsers)
@khatua.sashmita I don’t think currently we can test on multiple browsers on the same machine in parallel. For parallel testing you would require multiple bots, meaning multiple machines. So using data driven testing and multiple bots you would be able to test your application on multiple browsers at the same time.
@Rashmi Great tutorial. And I already discussed yes cross browser testing is possible and with data driven you can do it with single click. but the problem is we need multiple systems/VMs in order to run it in parallel because with parallel execution cross browser testing becomes less efficient.
@Rashmi thanks for great tutorial. It is really helpful. I am using Object repository feature . Can you please share some details how to do cross browser automation with Object repository feature enabled?
Thank you