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
1,308 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,800 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,870 points
3,904 views
0 votes
2 answers

How to get HTML Source of WebElement in Selenium WebDriver using Python?

You can read innerHTML attribute to get source of ...READ MORE

answered Jun 13, 2018 in Selenium by Samarpit
• 5,870 points
25,601 views
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,870 points
3,689 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,010 points
608 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
2,142 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,870 points
1,788 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,800 points
477 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,800 points
2,185 views