How Do I Change The Volume Of Chrome Using Selenium
I am working on a project that receives information from an Atmel board using python, and I needed to change the chrome browser volume. I am trying to use selenium but I only found
Solution 1:
You do not need selenium to do it. You need pycaw to control the volume of the application running on your system, here is an example of how to do it.
from __future__ import print_function
from pycaw.pycaw import AudioUtilities, ISimpleAudioVolume
sessions = AudioUtilities.GetAllSessions()
for session in sessions:
volume = session._ctl.QueryInterface(ISimpleAudioVolume)
if session.Process and session.Process.name() == "chrome.exe":
volume.SetMasterVolume(0.5, None)
Baca Juga
- How To Address Chrome Displaying "aw, Snap!" Page While Executing Tests Through Chromedriver And Selenium Through Python 3
- Selenium Webdriverexception: Message: Unknown Error: Cannot Determine Loading Status From Unknown Error: Missing Or Invalid 'entry.level'
- Can I Minimize Chrome Window While Selenium Is Running?
Post a Comment for "How Do I Change The Volume Of Chrome Using Selenium"