简体   繁体   English

如何在 selenium 测试中使用 java 代码检测两个 chrome 浏览器 windows 之间的音频连接?

[英]How to detect audio connection between two chrome browser windows using jave code in selenium tests?

I have invoked two apps from selenium.我从 selenium 调用了两个应用程序。 One browser window has customer app and the other agent app.一个浏览器 window 具有客户应用程序和另一个代理应用程序。 Now, agent initiates a audio call to customer.现在,代理向客户发起音频呼叫。 The connection is successfull.连接成功。 I know connection is successful based on some new UI elements on agent side that show up.我知道连接成功是基于代理端出现的一些新 UI 元素。 But, how do i verify if there is audio connection actually between these two browser windows using java code?但是,我如何使用 java 代码验证这两个浏览器 windows 之间是否真的存在音频连接? Also, if i mute audio from agent side, how to make sure audio connection is now only one way, ie from customer browser window to agent browser window and does not exist from agent window to customer window? Also, if i mute audio from agent side, how to make sure audio connection is now only one way, ie from customer browser window to agent browser window and does not exist from agent window to customer window?

you can set volume value like this你可以像这样设置音量值

JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("document.querySelector('locator').volume = 0.3;");
jse.executeScript("return document.querySelector('locator').muted");

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 java 中使用 selenium 在两个或多个 chrome 浏览器 windows(不是标签)之间切换? - How to switch between two or mutlple chrome browser windows (Not tabs) using selenium in java? 如何使用Selenium java在浏览器中的两个窗口之间切换 - How to switch between two windows in browser using Selenium java 如何在Chrome浏览器中运行硒测试? - How to run selenium tests in Chrome browser? 使用Selenium Java在浏览器中的两个窗口之间切换 - switch between two windows in browser using Selenium java 无法使用Selenium WebDriver在两个浏览器窗口之间切换 - Unable to switch between two browser windows using Selenium WebDriver 如何使用 Selenium Java 在两个浏览器选项卡/窗口之间获取活动的 window 标题 - How to get an active window title between two browser tabs/windows using Selenium Java 如何使用Java代码在selenium中为Chrome浏览器设置代理 - How to set proxy for Chrome browser in selenium using Java code 如何使用带有Java的Selenium WebDriver在Chrome中的Windows之间切换? - How to switch between windows in Chrome using Selenium WebDriver with Java? 在Chrome浏览器中。 如果您的连接不安全,则身份验证弹出代码不适用于使用Java的Selenium。 - in Chrome browser. authentication popup code not working with Selenium using Java if your connection is not secure notification appears 使用Selenium Webdriver在浏览器窗口之间切换 - Switching between browser windows using Selenium Webdriver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM