- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to invoke the IE browser in Selenium with python?
We can invoke any browsers with the help of the webdriver package. From this package we get access to numerous classes. Next we have to import the selenium.webdriver package. Then we shall be exposed to all the browsers belonging to that package.
For invoking the internet explorer browser, we have to select the Ie class. Then create the driver object of that class. This is the most important and mandatory step for browser invocation.
Every internet explorer browser gives an executable file. Through Selenium we need to invoke this executable file which is responsible for invoking the actual chrome browser.
Next we need to download the internet explorer driver version as per our browser version. The path of the IEDriverServer.exe file needs to be added in the executable file. Then we need to use the get () method to launch our application in that particular browser.
Example
Code Implementation
from selenium import webdriver #browser exposes an executable file #Through Selenium test we will invoke the executable file which will then #invoke actual browser driver = webdriver.Ie(executable_path="C:\IEDriverServer.exe") # to maximize the browser window driver.maximize_window() #get method to launch the URL driver.get("https://www.tutorialspoint.com/index.htm") #to refresh the browser driver.refresh() #to close the browser driver.close()
- Related Articles
- How to invoke the Chrome browser in Selenium with python?
- How to invoke the Firefox browser in Selenium with python?
- How to close a browser session in Selenium with python?
- How to start selenium browser with proxy?
- How to perform back and refresh in a browser in Selenium with python?
- How to launch Edge browser with Selenium Webdriver?
- How to maximize the browser in Selenium?
- Python selenium browser driver.back().
- How does selenium interact with the Web browser?
- How to switch different browser tabs using Python Selenium?
- How to avoid the pop-up window in chrome browser with Selenium?
- Browser Plugin Testing With Selenium.
- Use Selenium with Chromium Browser.
- How to refresh a browser then navigate to a new page with Javascript executor in Selenium with python?
- How to close active/current tab without closing the browser in Selenium-Python?
