S
S
Soft_touch_plastic2021-05-10 11:00:26
Python
Soft_touch_plastic, 2021-05-10 11:00:26

DeprecationWarning: desired_capabilities has been deprecated, please pass in a Service object error in Selenium?

Hello, I got this error when I switched from firefox webdriver to chrome webdriver if I want to specify pageLoadStrategy like this:

caps = DesiredCapabilities().CHROME
caps["pageLoadStrategy"] = "none"
driver = webdriver.Chrome(desired_capabilities=caps)

then this error is returned to me, although everything worked fine with firefox. What is the problem with chrome, and how to specify this parameter specifically when creating a driver?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alan Gibizov, 2021-05-10
@phaggi

Look at the link . There's clearly a different syntax for Python.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question