![webpage fx phone number webpage fx phone number](https://www.webfx.com/wp-content/uploads/2021/10/mobile.png)
![webpage fx phone number webpage fx phone number](https://www.10bestdesign.com/firms/drupal/2016/december/webpagefx/drupal-web-design-firm-blog.png)
Print(WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, icon icon-telephone']//a//following::div"))). The exchange rate (I always buy Euros) is always the best available. WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, icon icon-telephone']//a"))).click() Print(WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.CLASS_NAME, "info-tel-num"))).get_attribute("innerHTML"))ĭriver.execute_script("return arguments.scrollIntoView(true) ", WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, icon icon-telephone']//a")))) WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "-telephone"))).click() To extract the telephone no from the website you need to induce WebDriverWait for the element_to_be_clickable() and you can use the following Locator Strategies:Ĭode block using CSS_SELECTOR: driver.get("")ĭriver.execute_script("return arguments.scrollIntoView(true) ", WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.CSS_SELECTOR, "-telephone"))))
#WEBPAGE FX PHONE NUMBER CODE#
However, when I run the code individually in another cell in the jupyter it can prints out the desired phone no. I am using jupyter to run the code from selenium import webdriverĭriver = webdriver.Chrome('.\\chromedriver.exe')ĭriver.execute_script("window.scrollTo(0, 720)")īutton = are the code I am running, I expect to get '+33 141 57 22 81', but the actual output is '\n\t\t\t\t\t\t\t' print(driver.find_element_by_class_name('team-sh-tel').get_attribute('innerHTML')) By entering your details into this site, you are giving permission for us to store the information which we Phone number. from a website, I don't know why I keep getting the wrong information.