To run the selenium scripts in Internet Explorer, we need to download the driver from the below path.
Download IE Driver link
We can download 32 bit or 64 bit windows versions according to our system specifications.
After downloading, IE Driver should be placed in your local path. Usually it will be in C:/ drive.
Also one important thing that we need to do some configurations in Internet Explorer which is simple.
Just follow the below steps for configurations.
1. Open Internet Explorer
2. Go to Tools
3. Click Internet options
4. Go to Security Tab.
5. Click on Internet under Select a zone to view or change security settings.
6. Uncheck the box at Enable Protected Mode
7. Make the Security level for this zone to Medium level.
8. Click Apply and Restart the browser.
Note : Sometimes, it may need to do the same steps above for Local Intranet also under Select a zone to view or change security settings.
After the above configurations, one more thing that we need to do. Make the Zoom level to 100% percent in the Internet Explorer under View options.
Now all is set. You can try with the below code.
Code:
Download IE Driver link
We can download 32 bit or 64 bit windows versions according to our system specifications.
After downloading, IE Driver should be placed in your local path. Usually it will be in C:/ drive.
Also one important thing that we need to do some configurations in Internet Explorer which is simple.
Just follow the below steps for configurations.
1. Open Internet Explorer
2. Go to Tools
3. Click Internet options
4. Go to Security Tab.
5. Click on Internet under Select a zone to view or change security settings.
6. Uncheck the box at Enable Protected Mode
7. Make the Security level for this zone to Medium level.
8. Click Apply and Restart the browser.
Note : Sometimes, it may need to do the same steps above for Local Intranet also under Select a zone to view or change security settings.
After the above configurations, one more thing that we need to do. Make the Zoom level to 100% percent in the Internet Explorer under View options.
Now all is set. You can try with the below code.
Code:
import org.openqa.selenium.WebDriver; import org.openqa.selenium.ie.InternetExplorerDriver; public class IeDriver { public static void main(String args[]) { //Set the IE Driver path System.setProperty("webdriver.ie.driver", "C:\\Selenium_Training\\IEDriverServer.exe"); //Invoke the Internet explorer WebDriver driver = new InternetExplorerDriver(); } }