1.How to improve performance of the script in selenium webdriver?
2.isDiplayed() takes more time when element is not present how to over come this?
Ans- 1. use By.id(String arg) locator while locating any element. Avoid to use xpath in script because that always take time and reduce the performance but if xpath is required then use xpath.
2. isDisplayed() obviously will wait till the time webelement will not be visible so for this also use By.id to locate the element fast. One reason could be your internet speed.
2.isDiplayed() takes more time when element is not present how to over come this?
Ans- 1. use By.id(String arg) locator while locating any element. Avoid to use xpath in script because that always take time and reduce the performance but if xpath is required then use xpath.
2. isDisplayed() obviously will wait till the time webelement will not be visible so for this also use By.id to locate the element fast. One reason could be your internet speed.
No comments:
Post a Comment