I was normally using Firefox in Selenium with Python, but wanted to do some testing using Google Chrome, so I made the following change:
self.driver = webdriver.Firefox()
To
self.driver = webdriver.Chrome()
It opens Google Chrome but soon after it closes and this message appears at the prompt:
[6552: 2280: 1116 / 091247.001: ERROR: audio_manager_base.cc (275)] Invalid audio output parameters received; using fake audio path. Channels: 0, Sample Rate: 0, Bits Per Sample: 0, Frames Per Buffer: 0
As in my tests I will not use any audio, I tried to look for something to disable, but I only found it as a 'mute' and even with this option the error was the same.
I thought about passing something in the constructor to disable the audio, but it has nothing to do with it:
def __init__(self, executable_path="chromedriver", port=0,
chrome_options=None, service_args=None,
desired_capabilities=None, service_log_path=None)
And the message does not tell you where this file came from 'audio_manager_base.cc', I searched the chrome folder in the python folder and nothing.
The drive I'm using is the latest drive and Google Chrome as well.
Note: The log file generated by the drive is empty.
Update
During my research I saw that this error of the audio happened not only in Selenium, so I suspected, this error happens because the p2 plugin of the computer is without anything there, simple like that, but it still does not work, I was putting a pause in each line to check out why Chrome was closing, so I noticed that it's on the line where it does the screenshot, the strangest thing is that it does not show any errors:
qr = self.driver.find_element_by_css_selector(self._SELECTORS['qrCode'])
qr.screenshot(self.username+".png")
Update
I made a change in the code, now it takes the screenshot but only the whole screen, I need to take only one element, but with that I was able to continue the code flow a bit, and I discovered another problem when executing a script :
Store = driver.execute_script(script)
Displays the following error when trying to run the script:
selenium.common.exceptions.WebDriverException: Message: unknown error: Maximum call stack size exceeded
The problem that it does not can get a very large object to return from the script.
I'm coming to the following conclusion, that the drive for Google Chrome is very limited compared to that of firefox, the code works fine in firefox, but in Chrome these problems happen, throughout my search I realized that the problem is really limiting the drive, but even so I'm hoping this is cheated, so I keep asking this question here.