selenium-webdriver

WebDriverError: no such session error using ChromeDriver Chrome through Jenkins and Selenium

梦想与她 提交于 2020-07-06 05:51:28
问题 Often I am getting no such session error when I am running the scripts from Jenkins. What's the cause for it? Is there any connection failure or is it due to someother reason (I am running around 26 scripts and out of it atleast one script has no such session error) The scripts are different scripts and no such session error is not again repeated for the same scripts 回答1: I met this kind of case sometimes. I use ChromeDriver with Laravel Dusk, rather than Selenium. However, I believe the

How to print list of months present in dropdown list using Selenium Python with Webdriver

送分小仙女□ 提交于 2020-07-03 08:15:08
问题 dropdown details <select name="fromMonth"> <option value="1">January </option><option value="2">February </option><option value="3">March </option><option value="4">April </option><option value="5">May </option><option value="6">June </option><option value="7">July </option><option value="8">August </option><option selected="" value="9">September </option><option value="10">October </option><option value="11">November </option><option value="12">December </option></select> I would like to

How to print list of months present in dropdown list using Selenium Python with Webdriver

空扰寡人 提交于 2020-07-03 08:14:11
问题 dropdown details <select name="fromMonth"> <option value="1">January </option><option value="2">February </option><option value="3">March </option><option value="4">April </option><option value="5">May </option><option value="6">June </option><option value="7">July </option><option value="8">August </option><option selected="" value="9">September </option><option value="10">October </option><option value="11">November </option><option value="12">December </option></select> I would like to

Python and Selenium xpath for selecting with multiple conditions

社会主义新天地 提交于 2020-07-03 02:42:10
问题 I have the following code in selenium but continue to get a syntax error. I'm trying to select an element based on multiple conditions. choices = driver.find_elements_by_xpath("//div[contains(.,'5') and [contains(@class, 'option')]]")$ Thanks for any help you can give. 回答1: As per the xpath you have shared as follows : choices = driver.find_elements_by_xpath("//div[contains(.,'5') and [contains(@class, 'option')]]")$ You need to consider a few facts : The multiple conditions for selecting the

An unhandled exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll Additional information: Unexpected error. Unknown error

二次信任 提交于 2020-06-29 11:20:47
问题 I am creating a very simple console application to essentially show that I have setup the web driver correctly before moving on to more advanced applications. I am using C# with the selenium language bindings and Microsoft Edge. I have version 3.0 of the Selenium Web Driver C# language bindings listed here. I have Microsoft Edge version 38.14393.0.0 with Microsoft EdgeHTML 14.14393 I am on Windows 10 Anniversary edition (14393 Build 1607) and have the corresponding version of the Micrsoft Web

Inconsistency in scraping through <div>'s in Selenium

元气小坏坏 提交于 2020-06-29 03:53:28
问题 I'm working on scraping all of the Air Jordan Data off of grailed.com (https://www.grailed.com/designers/jordan-brand/hi-top-sneakers). I am storing the size, model, url, and image url in an object. I currently have a program that scrolls through the entire feed and fetches all of this. Everything works except finding the image url. I have tried many things and the issue seems to be that for some elements in the feed Selenium doesn't detect the div or url containing the image. I have gone

WebDriver Drag-and-Drop does not work on the page

别说谁变了你拦得住时间么 提交于 2020-06-29 03:33:53
问题 I have a very simple test @Test void dragAndDrop() { driver.get("https://www.testandquiz.com/selenium/testing.html"); driver.manage().window().maximize(); WebElement source = driver.findElement(By.id("sourceImage")); WebElement target = driver.findElement(By.id("targetDiv")); builder.dragAndDrop(source, target).perform(); } The test passes without any exceptions. However, it does not perform drag-and-drop. I tried on Chrome, Firefox, and Edge. Appreciate any help. 回答1: There are issues with

Move to Element Syntax in Seleniumbasic - Excel VBA

大城市里の小女人 提交于 2020-06-28 09:10:06
问题 I have looked across everywhere to find answers but could not get it, so would like your help in guiding me. Selenium Basic (Excel VBA ) is giving me syntax error at the time of compilation. My Objective is to move the mouse to a known element. Here are the codes Dim driver As New WebDriver Dim actions As Selenium.actions driver.Start "chrome", "http://anywebsite.com" driver.get "/" WebElement we = driver.FindElementByClass("MyClassName") actions.MoveToElement (we) It gives me an error at the

how to install selenium

时间秒杀一切 提交于 2020-06-28 06:36:45
问题 I am using python 3.5.2, when am tryng to import the selenium it is throwing an error No module named selenium below is my code: from selenium import webdriver 回答1: You should install the selenium package first. pip install selenium 回答2: I installed selenium through pip install selenium like yan said, but I still received the same error. The problem in my case was that selenium was installed on a different drive than my project was on (i.e. project was on D:, selenium was on C:). Moving both

Selenium-Asserting the presence of multiple keywords of an array in a List

喜夏-厌秋 提交于 2020-06-28 06:20:19
问题 Trying to check the presence of multiple keywords in a list. List<String> array=new ArrayList<String>(); array.add("Sam Mayers test"); array.add(""); array.add("value"); array.add(""); array.add(""); array.add(""); array.add("District 49"); array.add("Till the last test"); array.add("Dawn Strings"); array.add("Lists value"); array.add(""); array.add(""); array.add("Total Hits Lists"); array.add("Values"); Boolean found = false; List<String> keywords_tobe_checked = new ArrayList<>(); keywords