SideeX / sideex

The Official Repository of SideeX 2
http://sideex.org
187 stars 54 forks source link

Forcing sideex to use something else but not `id` of an element while recording? #18

Open shahidcodes opened 6 years ago

shahidcodes commented 6 years ago

I've a spa (webix) which uses dynamic id by default. That means it changes everytime I refresh so recorded test wont work next time. Is there any way to force sideex to use custom attribute or xpath for selection of element? Looking at the code I found this recorder-handlers.js#L39 but it looks like it is for form submission.

NagendraKuppala commented 6 years ago

Hi, I'm fellow Sideex user. I'm also facing same issue. I think it will be great if we can loop the target values to find the element instead of using just one target value. Current scenario : Executing the command line with only selected/shown target value. If the ID dynamically changes every time test case executed, results in test case failed. Proposed scenario: Execute the command line with all the available target values of an element (ID, name, link, css, xpath) to make sure the element is not present in the webpage before test case fails. Check for ID (If fails) -> check for NAME (if pass) --> then execute the command line with working target value.

Let me know if you have any findings. Thanks