selenium

Proxy authentication popup in Selenium

余生长醉 提交于 2021-01-27 07:40:34
问题 I am working on a project where I need to use a proxy. I am using the Chrome browser and when I run my script it forces me to enter the username and password of the proxy. I have tried passing the username and password with the URL itself, but it is not working. Here is the code: Proxy p = new Proxy(); p.setHttpProxy("in-pr.oxylabs.io:20000"); p.setSslProxy("in-pr.oxylabs.io:20000"); System.setProperty("webdriver.chrome.driver","D:\\Love_Testing\\Senium_Naveen\\chrome Driver\\chromedriver

finding element by classname and tagname using selenium webdriver

六月ゝ 毕业季﹏ 提交于 2021-01-27 07:24:58
问题 There are classes and tagname and I am writing the below selenium code to find description from below code but its not working. WebElement WWdescription = driver.findElement(By.className("atb-delivery-accordions").className("section highlight-01").tagName("p")); <div class="atb-delivery-accordions"> <div class="page-accordion opened"> <input id="moreDetails-acc" class="acc-check" type="checkbox" checked=""> <label class="acc-label opened" data-panel-id="moreDetailsAcc" for="moreDetails-acc"

finding element by classname and tagname using selenium webdriver

こ雲淡風輕ζ 提交于 2021-01-27 07:24:11
问题 There are classes and tagname and I am writing the below selenium code to find description from below code but its not working. WebElement WWdescription = driver.findElement(By.className("atb-delivery-accordions").className("section highlight-01").tagName("p")); <div class="atb-delivery-accordions"> <div class="page-accordion opened"> <input id="moreDetails-acc" class="acc-check" type="checkbox" checked=""> <label class="acc-label opened" data-panel-id="moreDetailsAcc" for="moreDetails-acc"

Selenium - Exception - Connection getting closed

ぃ、小莉子 提交于 2021-01-27 07:07:07
问题 I am using the latest Selenium WebDriver running using .NET/Microsoft Technology stack. What I am observing these days is that all of my tests in the suite starts failing throwing this exception Additional information: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:5557/wd/hub/session/c775e68e-c842-41b3-a1a6-44a88ef4c210/element. The status of the exception was KeepAliveFailure, and the message was: The underlying

.NET Core Selenium WebDriver not found

醉酒当歌 提交于 2021-01-27 06:40:20
问题 I've converted an NUnit test project from .NET Framework to .NET Core. When I try to execute a Selenium test using Visual Studio, I am seeing this error: OpenQA.Selenium.DriverServiceNotFoundException : The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html. I've included the Selenium.WebDriver.ChromeDriver Nuget Package and chromedriver.exe

.NET Core Selenium WebDriver not found

南笙酒味 提交于 2021-01-27 06:40:08
问题 I've converted an NUnit test project from .NET Framework to .NET Core. When I try to execute a Selenium test using Visual Studio, I am seeing this error: OpenQA.Selenium.DriverServiceNotFoundException : The chromedriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. The driver can be downloaded at http://chromedriver.storage.googleapis.com/index.html. I've included the Selenium.WebDriver.ChromeDriver Nuget Package and chromedriver.exe

Chrome not reachable

喜你入骨 提交于 2021-01-27 06:31:41
问题 I am getting the below error message when running my unit tests. Can anyone tell me what is causing this and how to resolve? Error: chrome not reachable (Driver info: > chromedriver=0.7,platform=Windows NT 6.1 x86) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 21.58 seconds 来源: https://stackoverflow.com/questions/16178753/chrome-not-reachable

Deploy EXE provided by Nuget package as a component of a ClickOnce installation

安稳与你 提交于 2021-01-27 05:30:31
问题 I have a WPF application that makes use of Selenium to automate internet explorer instances. The application is deployed to users as a click-once installation. It makes use of the Selenium.WebDriver.IEDriver nuget package, which provides IEDriverServer.exe to the bin directory automatically. This exe is not an entry in the project, but is copied there automatically as part of the build process. In order for my application to run on computers it is installed on, this exe needs to be included

Deploy EXE provided by Nuget package as a component of a ClickOnce installation

一曲冷凌霜 提交于 2021-01-27 05:30:09
问题 I have a WPF application that makes use of Selenium to automate internet explorer instances. The application is deployed to users as a click-once installation. It makes use of the Selenium.WebDriver.IEDriver nuget package, which provides IEDriverServer.exe to the bin directory automatically. This exe is not an entry in the project, but is copied there automatically as part of the build process. In order for my application to run on computers it is installed on, this exe needs to be included

selenium scroll by specific pixel values

梦想与她 提交于 2021-01-27 05:20:27
问题 I see for python selenium I can scroll to element using self.driver.execute_script("return arguments[0].scrollIntoView(true);", element) Or using pixel value as driver.execute_script("window.scrollTo(0, <vertical_position_to_scroll> )") But is there way to scroll by specific pixel values from current element or current position. e.g. If I moved to element I want to scroll 10 pixel up from there. 回答1: I would use window.scrollBy(x, y) like this: #first move to the element self.driver.execute