
Hi @A Pipaliya
You need to install Selenium Tools for Microsoft Edge if you want to use Selenium 3.141.0. Then you can still use add_argument
to set the capabilities.
You can install Selenium Tools for Microsoft Edge using the command below:
pip install msedge-selenium-tools selenium==3.141
Sample code:
from msedge.selenium_tools import Edge,EdgeOptions
edge_options = EdgeOptions()
edge_options.use_chromium = True
edge_options.add_argument("start-maximized")
edge_options.add_argument("inprivate")
driver = Edge(executable_path = "your_own_path_to_the_webdriver\\msedgedriver.exe", options=edge_options)
driver.get('https://www.google.com')
In addition, I suggest that you use the latest version of Selenium which don't need Selenium Tools for Microsoft Edge. You can also see that Selenium Tools for Microsoft Edge is deprecated and the Selenium project no longer maintains Selenium 3.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yu Zhou