How to set desired capabilities in Python Selenium Webdriver?

0 votes
How to set desired capabilities in Python Selenium Webdriver?
Jul 31, 2019 in Selenium by Himani
2,368 views

1 answer to this question.

0 votes

Hello Himani, you can try something like this to set Desired Capabilities in Python Selenium Webdriver:

options = webdriver.ChromeOptions()
options.add_argument("--headless")
options.add_argument("--disable-gpu")

capabilities = options.to_capabilities()

driver = webdriver.Remote(\command_executor='http://127.0.0.1:40000/wd/hub', \desired_capabilities=capabilities)

driver.get('https://www.edureka.co/')
answered Jul 31, 2019 by Abha
• 27,930 points

Related Questions In Selenium

0 votes
1 answer
+1 vote
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
5,686 views
0 votes
2 answers
0 votes
1 answer

How to find Elements by their Attribute in Python Selenium WebDriver

To find all the <td> tags which have attribute data-sortable-id you ...READ MORE

answered Jul 19, 2018 in Selenium by Samarpit
• 5,890 points
5,363 views
0 votes
1 answer

Installing Selenium Webdriver with Python package

Hey Hemant, for installing Selenium Webdriver with ...READ MORE

answered May 8, 2019 in Selenium by Anvi
• 14,090 points
2,373 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
3,095 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,346 views
0 votes
2 answers

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

You first need to download chrome driver ...READ MORE

answered Aug 26, 2019 in Selenium by Abha
• 27,930 points
638 views
0 votes
1 answer

How to read a JS variable in Selenium Webdriver?

Hi Himanshu, its quite easy to access any ...READ MORE

answered May 7, 2019 in Selenium by Abha
• 27,930 points
3,798 views