FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

Python - Selenium Chrome webdriver doesn't have components like WidevineCDM #1141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
I'm trying to use Selenium to open a page and go to Netflix and open a video 
and play. Once I actually get to the video, I can't load it because I get the 
error:

Missing Components... Please visit chrome://components, locate the WidevineCdm 
component...

When going to chrome://components, there aren't any components installed. If I 
had opened Chrome regularly and navigated to the video like I did in Selenium, 
I can play it. When I got to chrome://components in regular Chrome, there are 
more components in there. I'm trying to find out how to import my normal Chrome 
settings but I can't seem to figure that out. I've tried using ChromeOptions 
and DesiredCapabilities.CHROME but I couldn't get it to work. I also can't find 
documentation on all the items inside the DesiredCapabilities.CHROME 
dictionary. I hope that once I'm able to get normal Chrome settings into the 
webdriver version, I'd be able to load Netflix videos via Selenium Chrome 
webdriver.

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):

driver = webdriver.Chrome()
driver.get("https://www.netflix.com/")

user = "MY_NETFLIX_EMAIL"
passw = "MY_NETFLIX_PASSWORD"

signinButton = "//*[contains(text(), 'Sign In')]"
SIB = WebDriverWait(self.driver, 10).until(lambda driver: 
self.driver.find_element_by_xpath(signinButton))
SIB.click()

emailField = "email"
passField  = "password"
loginButton = "login-form-contBtn"
EF = WebDriverWait(self.driver, 10).until(lambda driver: 
self.driver.find_element_by_name(emailField))
PF = WebDriverWait(self.driver, 10).until(lambda driver: 
self.driver.find_element_by_name(passField))
LIB = WebDriverWait(self.driver, 10).until(lambda driver: 
self.driver.find_element_by_id(loginButton))

EF.clear()
PF.clear()
EF.send_keys(user)
PF.send_keys(passw)

LIB.click()

account = "profileName"
accButton = WebDriverWait(self.driver, 10).until(lambda driver: 
self.driver.find_element_by_class_name(account))
accButton.click()

chooseShow = "playRing"
pick = WebDriverWait(self.driver, 10).until(lambda driver: 
self.driver.find_element_by_class_name(chooseShow))
pick.click()

I don't get a run time error or anything, what I get is more of an error within 
the browser due to lack of components. The exact error message from Chrome is:

Whoops, something went wrong...

Missing Component

We cannot find all the required components to play Netflix on this device. 
Please visit chrome://components, locate the WidevineCdm component, and click 
the "Check for update" button.

As stated in the description, I can't seem to find any way to import the 
components. In regular Chrome, is see that there is a WidevineCdm component AND 
plugins. What I also notice is that there is not a WidevineCdm extension. I am 
however able to add that extension into the Chrome driver using the following 
command before setting up the driver:

options = webdriver.ChromeOptions()
options.add_argument("load-extension=C:\\Users\\MYCOMP\\AppData\\Local\\Google\\
Chrome\\User Data\\WidevineCDM\\1.4.8.823")
self.driver = webdriver.Chrome(desired_capabilities=options.to_capabilities())

But this doesn't do anything really to help solve my problem.

Original issue reported on code.google.com by bhn2...@gmail.com on 30 Jun 2015 at 3:07

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 30 Jun 2015 at 5:07