webdriver-w3c-spec

Difference between JsonWireProtocol mechanisms and the new standards in W3C Living Document when using Selenium

强颜欢笑 提交于 2021-02-19 05:34:21
问题 I'm wondering what are the differences between the mechanisms in JsonWireProtocol ( Status: OBSOLETE ) and W3C Living Document from 31 December 2019 ( the new standard ) when using Selenium for UI tests. I know that Selenium have used the following: When we make a new instance of a driver (C#): using OpenQA.Selenium; using OpenQA.Selenium.Chrome; IWebDriver driver = new ChromeDriver(); we actually make a POST /session request to the selenium server. After that via JsonWireProtocol and, in

Protractor W3C capability

浪尽此生 提交于 2021-01-29 10:50:19
问题 I am using Protractor with Selenoid . I need to use the dockerized Windows images so that I can test Internet Explorer and Edge from Linux boxes. I was able to make it work from curl by running: curl -X POST http://127.0.0.1:4444/wd/hub/session -d '{"capabilities":{"browserName":"MicrosoftEdge","count":1,"alwaysMatch":{"browserName":"MicrosoftEdge","selenoid:options":{"enableVNC":true,"enableVideo":false,"enableLog":true,"logName":"edge-18.0.log"}}}}' My protractor config looks like:

How does Selenium click on elements that are 50% on screen and 50% not on screen?

与世无争的帅哥 提交于 2020-02-05 02:53:33
问题 There is a div-Element. 50% of its size are on the screen. The other 50% go over the screen height and are not visible. There is no scrolling possible. I tried to automate a test with Selenium and click on that div-element, but sometimes it works and sometimes it does not. Why does Selenium not just click on the "on-screen-area" of that div? And how is this functionality implemented? When I tell Selenium to click on a huge div-element, does it click on a random position on that div? 回答1:

How does Selenium click on elements that are 50% on screen and 50% not on screen?

半城伤御伤魂 提交于 2020-02-05 02:52:13
问题 There is a div-Element. 50% of its size are on the screen. The other 50% go over the screen height and are not visible. There is no scrolling possible. I tried to automate a test with Selenium and click on that div-element, but sometimes it works and sometimes it does not. Why does Selenium not just click on the "on-screen-area" of that div? And how is this functionality implemented? When I tell Selenium to click on a huge div-element, does it click on a random position on that div? 回答1:

Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection

こ雲淡風輕ζ 提交于 2020-01-08 14:16:16
问题 I'm trying to automate a very basic task in a website using selenium and chrome but somehow the website detects when chrome is driven by selenium and blocks every request. I suspect that the website is relying on an exposed DOM variable like this one https://stackoverflow.com/a/41904453/648236 to detect selenium driven browser. My question is, is there a way I can make the navigator.webdriver flag false? I am willing to go so far as to try and recompile the selenium source after making

Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection

为君一笑 提交于 2020-01-08 14:15:02
问题 I'm trying to automate a very basic task in a website using selenium and chrome but somehow the website detects when chrome is driven by selenium and blocks every request. I suspect that the website is relying on an exposed DOM variable like this one https://stackoverflow.com/a/41904453/648236 to detect selenium driven browser. My question is, is there a way I can make the navigator.webdriver flag false? I am willing to go so far as to try and recompile the selenium source after making

Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection

こ雲淡風輕ζ 提交于 2020-01-08 14:14:08
问题 I'm trying to automate a very basic task in a website using selenium and chrome but somehow the website detects when chrome is driven by selenium and blocks every request. I suspect that the website is relying on an exposed DOM variable like this one https://stackoverflow.com/a/41904453/648236 to detect selenium driven browser. My question is, is there a way I can make the navigator.webdriver flag false? I am willing to go so far as to try and recompile the selenium source after making

Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection

瘦欲@ 提交于 2020-01-08 14:12:30
问题 I'm trying to automate a very basic task in a website using selenium and chrome but somehow the website detects when chrome is driven by selenium and blocks every request. I suspect that the website is relying on an exposed DOM variable like this one https://stackoverflow.com/a/41904453/648236 to detect selenium driven browser. My question is, is there a way I can make the navigator.webdriver flag false? I am willing to go so far as to try and recompile the selenium source after making

How to get currently active tab index on Chrome via Selenium?

五迷三道 提交于 2019-12-20 06:15:47
问题 I'm creating app which is half-automated (user is opening tabs (attention) and if he wants to dump one of them he just clicks hot-key). But when user opens to much tabs, I need to know to which one I should switch. How can i get currenttab index. Or switch to current tab on Selenium C#? string windowHandle = Browser.WindowHandles.Last(); string windowHandle = Browser.WindowHandles.First(); string windowHandle = Browser.WindowHandles[1]; ... is not working for me. 回答1: The currenttab index may

Is it possible to programmatically determine whether W3C action commands are used?

倾然丶 夕夏残阳落幕 提交于 2019-12-11 02:25:57
问题 The Selenium Javadoc for Actions.moveToElement indicate that the meanings of the xOffset and yOffset arguments are as follows. xOffset - Offset from the top-left corner. A negative value means coordinates left from the element. yOffset - Offset from the top-left corner. A negative value means coordinates above the element. Consider the following program, run on Linux against Firefox Quantum. public class FirefoxTest { public static void main(String[] args) { // Set up driver WebDriver driver