What are the Challenges faced using selenium Testing?
1. Handling dynamic changing ID to
locate element Is tricky. If element's ID Is changing every time when you
reload the software web application page and you have to use that ID In XPath
to locate element then you have to use functions like starts-with(@id,'post-body-')
or contains(@id,'post-body-') In XPath. Ends-with (@id,'post-body-')
etc.
2. If you have to execute your test cases In
multiple browsers
then one test case can run successfully In Firefox browser but same test case
may fail In IE browser due to the timing related Issues (NoSuchElementException)
because test execution In Firefox browser Is faster than IE browser. You can
resolve this Issue by Increasing Implicit wait time when you run your test In
IE browser
3. Dealing with pop-up windows: To
handle any kind of alert popup, you can apply a getAlert function. Before
actually running the script, you must import a package that can generate a
WebDriver script for handling alerts. The efficient interface brings with it
the following commands: void dismiss (), void accept (), get Text (), void
send Keys (String stringToSend). The first two basically click on the “cancel”
and “OK” buttons respectively on a popup window.
4. Timeout resulting from synchronization
problems: One
should ideally use selenium.IsElementPresent (locator) to verify that the
object is in a loop with Thread. Sleep
5. Testing
Flash apps: To automate flash apps with Selenium, one can
use Flex Monkium.
6. Protected
Mode must
be set to the same value error occurs when trying to run Selenium Web Driver on
a fresh Windows machine. This issue can be fixed by using capabilities
7. Unexpected error launching Internet Explorer. Browser zoom level should be set to 100% by default for the IE browser to overcome this error.
...................................
No comments:
Post a Comment