webdriver

How does this website detect remote control with selenium and chromedriver?

怎甘沉沦 提交于 2020-07-15 07:57:19
问题 I’m trying to screen scrape my own credit card information from the Discover website using selenium and chromedriver. In response it returns the error: Your account cannot currently be accessed. Outdated browsers can expose your computer to security risks. To get the best experience on Discover.com, you may need to update your browser to the latest version and try again. Interestingly, if I write a script to open a headed browser and type in some random account and password, it works normally

Why doesn't ChromeDriver require Chrome or Chromium?

我怕爱的太早我们不能终老 提交于 2020-07-11 10:16:47
问题 ChromeDriver is working on my system even though I don't have Chrome or Chromium installed. Based on the name, I thought it was like a "car driver" where you still need a car to get going. Or maybe like a product's API where you still need the product for your API calls to accomplish something. Edit: Whoops, Chromium is installed after all. 回答1: Of course ChromeDriver requires Chrome or Chromium . As per ChromeDriver - WebDriver for Chrome ChromeDriver is a separate executable that WebDriver

How to press CTRL+T and CTRL+TAB in selenium WebDriver using Java?

雨燕双飞 提交于 2020-07-07 06:00:19
问题 Hi All, For one of my project I need to open a new tab and navigate between the tabs for the same I need to know how can I press CTRL + T and CTRL + TAB in Selenium Webdriver using Java. Please let me know how can I do the same.Thank You...!!! I'm using the below: Firefox Version: 48.0.2 Java Version: 1.8 Selenium WebDriver Version: 3.0.0 OS: Windows 10 I tried the below code but it doesn't seems to be working: import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa

How to press CTRL+T and CTRL+TAB in selenium WebDriver using Java?

自作多情 提交于 2020-07-07 06:00:05
问题 Hi All, For one of my project I need to open a new tab and navigate between the tabs for the same I need to know how can I press CTRL + T and CTRL + TAB in Selenium Webdriver using Java. Please let me know how can I do the same.Thank You...!!! I'm using the below: Firefox Version: 48.0.2 Java Version: 1.8 Selenium WebDriver Version: 3.0.0 OS: Windows 10 I tried the below code but it doesn't seems to be working: import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa

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

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

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

WebDriverWait for multiple conditions (OR logical evaluation)

故事扮演 提交于 2020-06-28 04:12:28
问题 Using python, the method WebDriverWait is used to wait for 1 element to be present on the webpage. How can this method be used without multiple try/except? Is there an OR option for multiple cases using this method? https://selenium-python.readthedocs.io/waits.html 回答1: Without using multiple try/except{} to induce WebDriverWait for two elements through OR option you can use either of the following solutions: Using CSS_SELECTOR : element = WebDriverWait(driver, 10).until( EC.presence_of

How to change the User Agent using Selenium and Python

半腔热情 提交于 2020-06-26 06:58:07
问题 I am having an error when changing the web driver user agent in Python using selenium. Here is my code: import requests import json from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities driver = webdriver.Chrome(driver_path) driver.execute_cdp_cmd('Network.setUserAgentOverride', {"userAgent": 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36'}) #Error is on line above Here