selenium

Python Selenium - AttributeError : WebElement object has no attribute sendKeys in textarea

試著忘記壹切 提交于 2021-02-02 09:39:25
问题 My code : from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.webdriver.common.by import By driver=webdriver.Firefox() driver.get("http://www.58yumi.com/") driver.find_element_by_id("UserName").send_keys("XXXXXXX") driver.find_element_by_id("Password").send_keys( "XXXXXX") driver.find_element_by_xpath("//*[contains(@type,'submit')]").click() driver.get("http://www.58yumi.com/user_jiexi.htm") driver.find_element_by_id("cznr").sendKeys(

Automating jQuery based bootstrap dropdown using Selenium and Java

三世轮回 提交于 2021-02-02 09:38:30
问题 I am trying to list all elements from the bootstrap dropdown and then select a certain value. However, it returns 0 values. Any suggestions will be greatly appreciated. driver.findElement(By.id("imgSelectButton")).click(); Thread.sleep(3000); List<WebElement> list = driver.findElements(By.xpath("//ul/li[@class='logoSelectOpt']//li")); System.out.println(list.size()); for(int i=0; i<list.size(); i++){ System.out.println(list.get(i).getText()); if (list.get(i).getText().contains("History")){

Automating jQuery based bootstrap dropdown using Selenium and Java

徘徊边缘 提交于 2021-02-02 09:37:07
问题 I am trying to list all elements from the bootstrap dropdown and then select a certain value. However, it returns 0 values. Any suggestions will be greatly appreciated. driver.findElement(By.id("imgSelectButton")).click(); Thread.sleep(3000); List<WebElement> list = driver.findElements(By.xpath("//ul/li[@class='logoSelectOpt']//li")); System.out.println(list.size()); for(int i=0; i<list.size(); i++){ System.out.println(list.get(i).getText()); if (list.get(i).getText().contains("History")){

Automating jQuery based bootstrap dropdown using Selenium and Java

大兔子大兔子 提交于 2021-02-02 09:36:04
问题 I am trying to list all elements from the bootstrap dropdown and then select a certain value. However, it returns 0 values. Any suggestions will be greatly appreciated. driver.findElement(By.id("imgSelectButton")).click(); Thread.sleep(3000); List<WebElement> list = driver.findElements(By.xpath("//ul/li[@class='logoSelectOpt']//li")); System.out.println(list.size()); for(int i=0; i<list.size(); i++){ System.out.println(list.get(i).getText()); if (list.get(i).getText().contains("History")){

Unable to locate element using selenium chrome webdriver in python selenium

China☆狼群 提交于 2021-02-02 09:32:37
问题 I am new to python and trying to do some webscraping but have some real issues. May be you can help me out. HTML: <input autocomplete="off" type="search" name="search-search-field" placeholder="150k companies worldwide" data-cy-id="search-search-field" class="sc-dnqmqq grpFhe" value=""> The first part of my code looks as follows and works good without having any issues: driver.get("https:") login = driver.find_element_by_xpath(email_xpath).send_keys(email) login = driver.find_element_by_xpath

How to change the date of a hidden element of a Datepicker using setAttribute method and Selenium with Python?

杀马特。学长 韩版系。学妹 提交于 2021-02-02 09:25:28
问题 I have been struggling for days to find a way to set a date of a datepicker using Selenium with Python. I found out that there is a hidden element with the date, so I tried javascript executor to set a value to that hidden element. I tried different ways, and the scripts seem to execute fine, but the date doesn't change. My script looks like this: #input date by using hidden date method 1 element = browser.find_element_by_xpath("/html[1]/body[1]/div[1]/form[1]/table[1]/tbody[1]/tr[1]/td[1]

Selenium app redirect to Cloudflare page when hosted on Heroku

我只是一个虾纸丫 提交于 2021-02-02 09:07:24
问题 I have made a discord bot that uses selenium to access a website and get information, when I run my code locally I don't have any problem but when I deploy to Heroku the first URL I get redirects me to the page Attention Required! | Cloudflare . I have tried: Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection And many other with the same settings which I use: options = Options() options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") options.add

Selenium app redirect to Cloudflare page when hosted on Heroku

橙三吉。 提交于 2021-02-02 09:06:56
问题 I have made a discord bot that uses selenium to access a website and get information, when I run my code locally I don't have any problem but when I deploy to Heroku the first URL I get redirects me to the page Attention Required! | Cloudflare . I have tried: Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection And many other with the same settings which I use: options = Options() options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") options.add

Selenium app redirect to Cloudflare page when hosted on Heroku

落花浮王杯 提交于 2021-02-02 09:06:40
问题 I have made a discord bot that uses selenium to access a website and get information, when I run my code locally I don't have any problem but when I deploy to Heroku the first URL I get redirects me to the page Attention Required! | Cloudflare . I have tried: Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection And many other with the same settings which I use: options = Options() options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") options.add

Selenium app redirect to Cloudflare page when hosted on Heroku

。_饼干妹妹 提交于 2021-02-02 09:06:19
问题 I have made a discord bot that uses selenium to access a website and get information, when I run my code locally I don't have any problem but when I deploy to Heroku the first URL I get redirects me to the page Attention Required! | Cloudflare . I have tried: Selenium webdriver: Modifying navigator.webdriver flag to prevent selenium detection And many other with the same settings which I use: options = Options() options.binary_location = os.environ.get("GOOGLE_CHROME_BIN") options.add