If you Browser window is not closing, even after you have written the close( ) Predefined method in your automation code, then you have to check whether you are using the supported Browser version or not.
Follow the below steps to verify whether you are using the supported Browser version:
1. Find the version of the Selenium WebDriver you are using in your Automation Project as shown below:
2. From the above screenshot its very clear that, I am using Selenium WebDriver version 2.33.0
3. Now launch the Firefox Browser installed on your computer as shown below and note down the version you are using:
4. So from the above screenshot its very clear that we are using the Firefox Browser version 20.0
5. Now lets find out whether the Selenium WebDriver version 2.33.0 is supported by the Firefox Browser version 20.0 by following the next steps.
6. Open http://seleniumhq.org and go to Downloads page as shown below:
7. Go to the Selenium Client and WebDriver Language Bindings heading as shown below and click on the 'Change Log' link for Java Language category as shown below:
8. Ensure that the Change Log Web Page got displayed as shown below:
9. Search for 'Support' term as shown below and ensure that search results are displayed:
10. Go through the search results one by one and stop when you find any statement which says support for Firefox Browser as shown below:
11. From the above screenshot its very clear that we got support for Firefox Browser versions 19 and 20 from starting with the Selenium WebDriver Version 2.23.0 . Hence Firefox Browser version 19 and 20 are supported by the Selenium WebDriver versions 2.32.0 and above. Hence the WebDriver version 2.33.0 has support for Firefox Browser version 20.0
In this way, we have to find the browser versions supported by the Selenium WebDriver versions.
In this example we've found the supported Firefox Browser version. We can also find the supported versions of other browsers i.e. Chrome, Internet Explorer etc.
If in case any of your WebDriver commands are not working even if you have written them properly in your Automation Code, then you have to first check whether your Browser version is supported by the Selenium WebDriver version you are using.
Please comment below to feedback or ask questions.
Using click( ) WebDriver command for selecting a check box option will be explained in the next post.