0

this is html code and structure

I get 2 words but it returns a blank list, so I used the WebDriverWait function but I still have an error

I saw all the possible options on the internet but could not fix it

How fix??

this is code --->

from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC # available since 2.26.0

driver=webdriver.Chrome(executable_path="D:\chromedriverr\chromedriver.exe")
driver.get("https://bankofgeorgia.ge/ka/currencies")
teams = WebDriverWait(driver, 10).until(EC.presence_of_all_elements_located((By.XPATH, '//*[@id="tabs"]/bog-universal-tabs//div/iron-pages/div[1]/bog-currencies-list//div/div[2]/div/div/div[2]/div[3]')))
print([i.text for i in teams])

driver.close()
driver.quit()
kokiwebaaa
  • 159
  • 5
  • 13
  • "I still have an error" but you've neglected to post the error you are getting. –  Sep 23 '20 at 15:52
  • @JustinEzequiel this is --> selenium.common.exceptions.TimeoutException: Message. selenium (python) – kokiwebaaa Sep 23 '20 at 15:54
  • @JustinEzequiel posts title is error – kokiwebaaa Sep 23 '20 at 15:54
  • Pasting your xpath into DevTools' search text shows zero (0) hits. –  Sep 23 '20 at 15:57
  • @JustinEzequiel Can you explain me better? – kokiwebaaa Sep 23 '20 at 15:58
  • Weird page. I can only search for the `bog-app` tag. I am unable to search anything within the said tag. –  Sep 23 '20 at 16:29
  • See if the data [here](https://bankofgeorgia.ge/api/currencies/page/pages/5c0a361ff85d2d574073cf30) is what you need. –  Sep 23 '20 at 16:47
  • @JustinEzequiel How did you find it? – kokiwebaaa Sep 23 '20 at 16:56
  • DevTools, Network tab. –  Sep 23 '20 at 16:57
  • This page uses Shadow DOMs. In order to use Selenium to locate these specific elements, you need to use JavaScript execution. [See this question on how it was done](https://stackoverflow.com/questions/36141681/does-anybody-know-how-to-identify-shadow-dom-web-elements-using-selenium-webdriv) – Mangohero1 Sep 23 '20 at 19:07

0 Answers0