Issue
I wrote automation script using selenium java. I want to know if it is possible to for the code to do its job even after there is some change in the website's UI.
If the code will not work after update then is there any way to write a script that works even after the website's UI is changed.
Solution
Depends on the nature and the scale of changes. Some examples:
Automation framework may still succeed on website changes if:
- If the xpath and/or css-selectors are relative locators.
- If the changes are static changes, e.g. addition/deletion of static elements.
- If the JavaScript / AJAX callback times remain unchanged.
- No additional frames are added.
Automation framework may not succeed on website changes if:
- If the xpath and/or css-selectors are absolute as in that case the indexes will change.
- If there are addition/deletion of dynamic elements.
- If the JavaScript / AJAX callback time increases and that case you would need to increase the timeouts while implementing WebDriverWait.
- If additional iframes are added you would require more switching steps.
Answered By - undetected Selenium
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.