selenium-webdriver

Getting data from html table with selenium (python): Submitting changes breaks loop

旧街凉风 提交于 2020-03-24 09:44:49
问题 I want to scrape data from an HTML table for different combinations of drop down values via looping over those combinations. After a combination is chosen, the changes need to be submitted. This is, however, causing an error since it refreshes the page. This it what I've done so far: from selenium import webdriver from selenium.webdriver.support.ui import Select import time browser.get('https://daten.ktbl.de/feldarbeit/entry.html') # Selecting the constant values of some of the drop downs:

Altair automatic save chart using selenium chromedriver

杀马特。学长 韩版系。学妹 提交于 2020-03-23 08:50:13
问题 Asking this again as the previous has been closed without any useful solution. I am trying to produce few charts in a loop and save them automatically. I am working on Windows, using Chrome. I have been following the documentation on how to save a chart in svg. I downloaded the appropriate ChromeDriver for my Chrome version. gdf is my geodataframe and everything works smoothly and I can generate and manually save charts. Also, this example taken from the chromium documentation works: import

How to click on the button when the textContext contains leading and trailing white-space characters?

跟風遠走 提交于 2020-03-23 08:50:11
问题 I'm trying to click on the following button using Selenium with python: <button type="submit" tabindex="4" id="sbmt" name="_eventId_proceed"> Einloggen </button> This is just a simple button which looks like this: Code: driver.find_element_by_id('sbmt').click() This results in the following exception: selenium.common.exceptions.ElementNotInteractableException: Message: Element <button id="sbmt" name="_eventId_proceed" type="submit"> could not be scrolledinto view So, I tried scrolling to the

login to Yahoo using Python Selenium

心不动则不痛 提交于 2020-03-23 06:33:27
问题 My question actually is the same as this one login to yahoo email account using Python Selenium webdrive But since Yahoo has changed its login form UI, the answer provided in the above link doesn't work to me. Instead I tried the below code. from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC browser = webdriver.Firefox() browser.get('https://login

How to fix unknown error: unhandled inspector error: “Cannot find context with specified id”

一曲冷凌霜 提交于 2020-03-23 02:07:56
问题 The following code throws occasionally an org.openqa.selenium.WebDriverException . WebElement element = driver.findElement(by); element.click(); (new WebDriverWait(driver, 4, 100)).until(ExpectedConditions.stalenessOf(element)); The page looks like this (by is a selector for <a></a> ) <iframe name="name"> <html id="frame"> <head> ... </head> <body class="frameA"> <table class="table"> <tbody> <tr> <td id="83"> <a></a> </td> </tr> </tbody> </table> </body> </html> </iframe> The message is

How to fix unknown error: unhandled inspector error: “Cannot find context with specified id”

无人久伴 提交于 2020-03-23 02:06:13
问题 The following code throws occasionally an org.openqa.selenium.WebDriverException . WebElement element = driver.findElement(by); element.click(); (new WebDriverWait(driver, 4, 100)).until(ExpectedConditions.stalenessOf(element)); The page looks like this (by is a selector for <a></a> ) <iframe name="name"> <html id="frame"> <head> ... </head> <body class="frameA"> <table class="table"> <tbody> <tr> <td id="83"> <a></a> </td> </tr> </tbody> </table> </body> </html> </iframe> The message is

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

南楼画角 提交于 2020-03-21 19:23:04
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

房东的猫 提交于 2020-03-21 19:22:25
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

Using Selenium Webdriver to interact with Stripe Card Element iFrame - Cucumber/Selenium Java

帅比萌擦擦* 提交于 2020-03-21 19:21:22
问题 I have an form that I want to automate using Cucumber and Selenium Webdriver in Java - in this form, we have a card element which we use from Stripe. We call the div, and stripe does the rest. I'm unsure if this is an iFrame, but when I use the Hooks.driver.findElement(By.xpath("xpathOfTheCardNumberField")).sendKeys("123"); command, it does not interact with it and returns the "Unable to locate element" error in the console log. I have asked our front-ender to perhaps try and add some ID's or

pageLoadTimeout not working for Firefox browser in selenium

ⅰ亾dé卋堺 提交于 2020-03-21 06:38:23
问题 In firefox browser pageLoadTimeout is not working whereas same code is working for chromium browser. public static WebDriver startApplication(WebDriver driver, String browserName, String appURL) { switch (browserName.toLowerCase()) { case "chrome": WebDriverManager.chromedriver().setup(); driver = new ChromeDriver(); break; case "firefox": WebDriverManager.firefoxdriver().setup(); driver = new FirefoxDriver(); break; case "ie": WebDriverManager.iedriver().setup(); driver= new