Hey everyone. I have created a script which includes UiElements interaction like Type into, Get text, Click element etc on a webpage in google chrome.
The issue I am facing is that the script is working perfectly fine in my laptop but when I give this script to someone else and when they open the project and run the file it doesn’t work there. ( If I manually again select all the elements on their computer then it works for them)
The help I need from you guys is that how can I create a website project and deliver it to anybody who does not need to reconfigure the activities on their laptop. They just open the project and run the file and it should work smoothly as it works on my laptop.
Then for each of the selector that you are using you have to open ui explorer indicate the element and then refine the selector by adding only static or non changing attributes amd check if the selector is good if not add or remove few more and check again till you get a valid selector…make sure if there are any id or anything which contains numbers or class which contains multiple and changing …then those might not be very much reliable…
And also use wild cards where needed to make them dynamic…
Most helpful would be the centre top and right top qindows in the ui explorer try selecting combinations from both windows for the selector…Also ita good to first check the window titles and make them dynamic
There is nothing to do with the selectors they are validated already dear. Even If I logged out from the chrome in my laptop it stopped working until I sign in again to the chrome. It only executable on the same browser on which the script has been made this is the problem.
If its getting executed only one one and not on others then it would be a selector issue…try opening the same selector on a different machine or as you said when signed out and then idicate the same elements…then you would know the difference in the selectors…if you do it on the same browser with everything same it would work
The issue was selector, I guess. please consider below points
Use dynamic selectors: Rather than hard-coding selectors that may be specific to your machine or environment, use dynamic selectors that are more flexible and can adapt to changes in the UI of the website.
Use UiExplorer: Use the UiExplorer tool in UiPath to inspect the UI elements on the website and generate more robust selectors. This can help ensure that the selectors are consistent across different machines and environments.