webdriverwait

How to retrieve the list of values from a drop down list

半腔热情 提交于 2021-02-10 19:55:32
问题 I am trying to retrieve the list of available option expiries for a given ticker on yahoo finance. For instance using SPY as ticker on https://finance.yahoo.com/quote/SPY/options The list of expiries are in the drop down list: <div class="Fl(start) Pend(18px) option-contract-control drop-down-selector" data-reactid="4"> <select class="Fz(s)" data-reactid="5"> <option selected="" value="1576627200" data-reactid="6">December 18, 2019</option> <option value="1576800000" data-reactid="7">December

How to retrieve the list of values from a drop down list

拜拜、爱过 提交于 2021-02-10 19:54:41
问题 I am trying to retrieve the list of available option expiries for a given ticker on yahoo finance. For instance using SPY as ticker on https://finance.yahoo.com/quote/SPY/options The list of expiries are in the drop down list: <div class="Fl(start) Pend(18px) option-contract-control drop-down-selector" data-reactid="4"> <select class="Fz(s)" data-reactid="5"> <option selected="" value="1576627200" data-reactid="6">December 18, 2019</option> <option value="1576800000" data-reactid="7">December

How to select an element based on a polyline using Selenium and Python?

孤街醉人 提交于 2021-02-10 15:41:21
问题 I am trying to select and click on an element in Selenium, but it doesn't have the typical tags, and the xpath changes on reload. The symbol stays consistent though, and I want to be able to select the button using the symbol. The HTML looks like this: <svg x="0px" y="0px" viewBox="0 0 40 34" enable-background="new 0 0 40 34" focusable="false" style="fill: rgb(255, 255, 255); stroke-width: 0px; width: 100%; --darkreader-inline-fill:#e8e6e3;" data-darkreader-inline-fill=""> <g fill="none"

crawl javascript table but considered abnormal requests

我怕爱的太早我们不能终老 提交于 2021-02-10 15:35:42
问题 I am trying to crawl this currency rate website: https://banking.nonghyup.com/servlet/PGEF0011I.view (Just click the exchange rate check and you'll see the pic like below) I want to crawl this dynamical table and I find its url via "Inspect->Network is : https://banking.nonghyup.com/servlet/PGEF0012R.frag However, when I start to request it by selenium, it returns error due to abnormal requests, which comes up "We're sorry for causing you any inconvenience. You will not be able to use the

Can't get selenium to click button

两盒软妹~` 提交于 2021-02-10 12:42:34
问题 Pic of the website's inspect element More in Depth pic My Code snippet from selenium import webdriver from selenium.webdriver.common.keys import Keys import time from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from time import sleep import requests /// excel = driver.find_element_by_name('Excel') excel.click() I

Selenium Python Get Img SRC Returns Actual Image Data

萝らか妹 提交于 2021-02-10 12:22:31
问题 I am working with Selenium in Python and using Firefox web driver. I am trying to get the SRC of an image. When I first request the SRC I get the actual image data, not the SRC data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ ... If I run the exact same code a second time I will get the SRC example.jpg Here is my code fireFoxOptions = webdriver.FirefoxOptions() fireFoxOptions.set_headless() browser = webdriver.Firefox(firefox_options=fireFoxOptions) element = browser.find_element(By.ID ,

Selenium Python Get Img SRC Returns Actual Image Data

烂漫一生 提交于 2021-02-10 12:22:28
问题 I am working with Selenium in Python and using Firefox web driver. I am trying to get the SRC of an image. When I first request the SRC I get the actual image data, not the SRC data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ ... If I run the exact same code a second time I will get the SRC example.jpg Here is my code fireFoxOptions = webdriver.FirefoxOptions() fireFoxOptions.set_headless() browser = webdriver.Firefox(firefox_options=fireFoxOptions) element = browser.find_element(By.ID ,

Cannot read property 'click' of undefined while using Java Script Executor in Selenium

孤者浪人 提交于 2021-02-09 01:49:50
问题 I am getting an error: Cannot read property 'click' of undefined while trying to click a button using java script executor. I have tried many different approach to click the button using action classes, webdriverwait etc but none seems to work.Java Script is working in console but when i am using in my code i am unable to click the button and getting the mentioned error The html dom looks as below: <div> <a class="button button--new-resource" href="/admin/certificate_types/new"> <img src="

Cannot read property 'click' of undefined while using Java Script Executor in Selenium

心不动则不痛 提交于 2021-02-09 01:47:55
问题 I am getting an error: Cannot read property 'click' of undefined while trying to click a button using java script executor. I have tried many different approach to click the button using action classes, webdriverwait etc but none seems to work.Java Script is working in console but when i am using in my code i am unable to click the button and getting the mentioned error The html dom looks as below: <div> <a class="button button--new-resource" href="/admin/certificate_types/new"> <img src="

Cannot read property 'click' of undefined while using Java Script Executor in Selenium

ぐ巨炮叔叔 提交于 2021-02-09 01:46:49
问题 I am getting an error: Cannot read property 'click' of undefined while trying to click a button using java script executor. I have tried many different approach to click the button using action classes, webdriverwait etc but none seems to work.Java Script is working in console but when i am using in my code i am unable to click the button and getting the mentioned error The html dom looks as below: <div> <a class="button button--new-resource" href="/admin/certificate_types/new"> <img src="