selenium-chromedriver

Activate Flash in Chrome Selenium with Python

帅比萌擦擦* 提交于 2020-08-25 07:24:31
问题 I'm using Selenium with Python for some camera interface online. The problem is that I can't seem to get Flash activated in Selenium's Chrome. I find problems close to mine but none of the solutions worked : https://sqa.stackexchange.com/questions/30312/enable-flash-player-on-chrome-62-while-running-selenium-test None of the parameters I tried changed anything, all I get is the "Get Flash Player" link Here's my code : chrome_options = Options() prefs = { "profile.default_content_setting

Python Selenium: I am getting element is not attached to the page document error

萝らか妹 提交于 2020-08-20 14:20:23
问题 I am trying to build a scraper using selenium package for python but I am getting this error: Message: stale element reference: element is not attached to the page document (Session info: headless chrome=83.0.4103.61) I am using google colab. My code is: import selenium driver = webdriver.Chrome('chromedriver',chrome_options=chrome_options) titles=[] for link in links: driver.get(link) data = driver.find_elements_by_xpath('.//a[@class = "question-hyperlink"]') titles.append(data[0].text) The

java.lang.ClassCastException: org.openqa.selenium.By$ById cannot be cast to org.openqa.selenium.WebElement

谁说胖子不能爱 提交于 2020-08-12 04:23:03
问题 I try make a automation test using Page Object with annotation By in selenium webdriver, but de Eclipse show-me the following message error: java.lang.ClassCastException: org.openqa.selenium.By$ById cannot be cast to org.openqa.selenium.WebElement Follow the code: Class: AcertoPerfilTratamentoOs public class AcertoPerfilTratamentoOs { static WebDriver driver; By cidade = By.id("cboCidade"); By tipoOcorrencia = By.id("txtTipoOcorrencia"); public AcertoPerfilTratamentoOs(WebDriver driver) {

java.lang.ClassCastException: org.openqa.selenium.By$ById cannot be cast to org.openqa.selenium.WebElement

浪子不回头ぞ 提交于 2020-08-12 04:21:29
问题 I try make a automation test using Page Object with annotation By in selenium webdriver, but de Eclipse show-me the following message error: java.lang.ClassCastException: org.openqa.selenium.By$ById cannot be cast to org.openqa.selenium.WebElement Follow the code: Class: AcertoPerfilTratamentoOs public class AcertoPerfilTratamentoOs { static WebDriver driver; By cidade = By.id("cboCidade"); By tipoOcorrencia = By.id("txtTipoOcorrencia"); public AcertoPerfilTratamentoOs(WebDriver driver) {