InterviewSolution
| 1. |
Test Case Failed Saying "element Not Visible", But When Analyzed Manually Element Is Visible? How To Handle It? |
|
Answer» There are couples of things which may cause this ISSUE. Element may not be visible in automation DUE to the speed of selenium. If you closed a hidden division pop up, and tried to perform action, then there is a chance that hidden division popup' animation went over which could cause this issue. There is could be an another element which has same XPath or locator in some other page. Example: CONSIDER you have an element which has XPath as //button [@id='abc'] on page X, by CLICKING some tab on page navigates the user to MY page, Now there is an element on Y page which have XPath same as //button [@id='abc']. But when you launch your application, application may be directly landed on page Y. So with this scenario, if you TRY to perform on element on Y page it could throw an Error. There are couples of things which may cause this issue. Element may not be visible in automation due to the speed of selenium. If you closed a hidden division pop up, and tried to perform action, then there is a chance that hidden division popup' animation went over which could cause this issue. There is could be an another element which has same XPath or locator in some other page. Example: Consider you have an element which has XPath as //button [@id='abc'] on page X, by clicking some tab on page navigates the user to MY page, Now there is an element on Y page which have XPath same as //button [@id='abc']. But when you launch your application, application may be directly landed on page Y. So with this scenario, if you try to perform on element on Y page it could throw an Error. |
|