selenium-webdriver

org.openqa.selenium.SessionNotCreatedException: session not created disconnected:unable to send message to renderer error with ChromeDriver and Chrome

柔情痞子 提交于 2020-05-24 07:40:13
问题 I try to run this simple program on Java with Selenium: import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class MySelenium { public static void main(String[] args) { System.out.println("First Selenium"); System.setProperty("webdriver.chrome.driver", "C:\\automation\\drivers\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://www.seleniumhq.org/"); driver.quit(); } } But on running shows the following error: How can i fixed

WebDriverException: Returned value cannot be converted to WebElement: {} while using WebDriver with Safari 11 on Mac OS X

女生的网名这么多〃 提交于 2020-05-22 09:36:11
问题 I have a selenium webdriver script which performs some regression tests on my application under test. The script works perfectly on Google Chrome, Firefox, IE, etc. However, recently I tried running it on Safari (11.1.1) on Mac OS X (10.13.5), and my script fails with a weird message even when I call a simple line such as driver.findElement(By.tagName("body")); The exception I get is as follows: org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {} Build

How to find the coordinates of the buttons on a canvas, and click on them after using Java and Selenium?

不问归期 提交于 2020-05-21 07:12:19
问题 I have an online calculator that i want to automate some operations for, like subtraction, division, etc. but the thing is that there are no elements since it is a canvas app calculator (link below). I'm wondering how can i click the buttons so im able to automate some operations? The online calculator im trying to automate: https://www.online-calculator.com/full-screen-calculator/ The canvas HTML code <canvas id="canvas" width="335" height="434" style="position: absolute; display: block;

How locate the pseudo-element ::before using Selenium Python

醉酒当歌 提交于 2020-05-21 07:10:46
问题 I'm using Selenium Python to locate label element.I want to use ::before to locate it,because this is a pop window. <div class="crow" grp="0" grpname="Pizza Size"> ::before <label class="label0" cid="1"> <input type="radio" name="0" coname="M" sname="" price="9.99" value="392">M<b class="ip">9.99</b> </label> <label class="label0" cid="1"><input type="radio" name="0" coname="L" sname="" price="11.99" value="393">L<b class="ip">11.99</b> </label><div style="clear:both"> </div> </div> I have no

Selenium C# Test with Chrome Headless - Chrome File Upload Window not working

早过忘川 提交于 2020-05-17 08:06:22
问题 I have a test which uploads a profile image to the web application. In order to upload the image file, an upload button is clicked which opens a file upload window as shown in the screenshot below. The test then sends keys of the image file path to the file upload window in order to upload the file. When the test is run in chrome headless mode, the file upload window is not found and the send keys step fails. If the test is run in normal mode (without headless option) the test runs fine

How to create a correct parallel selenium execution using @BeforeSuite and each @Test are in a separate class with TestNG?

眉间皱痕 提交于 2020-05-17 07:31:49
问题 I trying to make a test design using Selenium and TestNG , I put each @Test in a separate class, and using once @BeforeSuite & @AfterSuite for all classes, the reason is: The code is easy to maintain Data Driven, in order to be able to choose which classes to run through the xml file. Then what I think is how I only login once and the session can be used by all subsequent tests, what I've done so far is: Base class: public class Base { protected static WebDriver driver; @BeforeSuite public

How to create a correct parallel selenium execution using @BeforeSuite and each @Test are in a separate class with TestNG?

≡放荡痞女 提交于 2020-05-17 07:31:04
问题 I trying to make a test design using Selenium and TestNG , I put each @Test in a separate class, and using once @BeforeSuite & @AfterSuite for all classes, the reason is: The code is easy to maintain Data Driven, in order to be able to choose which classes to run through the xml file. Then what I think is how I only login once and the session can be used by all subsequent tests, what I've done so far is: Base class: public class Base { protected static WebDriver driver; @BeforeSuite public

Run multiple web browsers simultaneously Selenium Python 3

江枫思渺然 提交于 2020-05-17 07:17:26
问题 I'm attempting to open multiple chrome drivers at once and have it run as fast as possible. It opens the first page, and it has to load completely before the second function executes with "browser_2". Is there a way to make these functions load at the same time? notice - I'm hiding "Proxy_list" from my post to protect those ips for this post. browser_1 = 0 browser_2 = 1 browser_3 = 2 browser_4 = 3 browser_5 = 4 browser_6 = 5 browser_7 = 6 browser_8 = 7 browser_9 = 8 browser_10 = 9 Link_1 =

What is EventFiringWebDriver in selenium?

蓝咒 提交于 2020-05-17 05:29:08
问题 I am new user on stackoverflow and also new in selenium, so please guide me about What is the EventFiringWebDriver in selenium and what the use of it. 回答1: EventFiringWebDriver is a JavaClass , basically it is a wrapper around an arbitrary WebDriver instance which supports registering of WebDriverEventListener . For more details refer here 回答2: EventFiringWebDriver is a method in selenium use to wrap the webdriver and WebEventListner is also method to get the message from eventfiringwebdriver

What is EventFiringWebDriver in selenium?

こ雲淡風輕ζ 提交于 2020-05-17 05:27:34
问题 I am new user on stackoverflow and also new in selenium, so please guide me about What is the EventFiringWebDriver in selenium and what the use of it. 回答1: EventFiringWebDriver is a JavaClass , basically it is a wrapper around an arbitrary WebDriver instance which supports registering of WebDriverEventListener . For more details refer here 回答2: EventFiringWebDriver is a method in selenium use to wrap the webdriver and WebEventListner is also method to get the message from eventfiringwebdriver