Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16536

how to filter a bi report dropdown with selenium

$
0
0

I'm trying to select an item in the drop-down, and I'm not able to, it stops at the drop-down part and doesn't select the item I want, which in this case is to clear what is written and filter it again, which stays within the drop-down. Can you help me?? Thank you very much.

Dropdown that I want to filter:

dropdown that I want to filter

html code of the search bar I want to clear"`

`

`import timeimport pandas as pdfrom selenium import webdriverfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support.ui import WebDriverWaitfrom selenium.webdriver.common.by import Byfrom selenium.webdriver.support import expected_conditions as ECfrom selenium.webdriver.support.ui import Selectfrom selenium.webdriver.support.select import Selectarquivo_excel = filedialog.askopenfilename(filetypes=\[("Arquivos Excel", "\*.xlsx")\])driver = webdriver.Chrome()driver.get('power bi report')driver.set_window_size(1200,600)time.sleep(5) #Go to the second page of the reportdriver.find_element(By.XPATH, "//i\[@class='glyphicon glyph-small pbi-glyph-chevronrightmedium middleIcon active'\]").click()time.sleep(5) #open the dropdowndriver.find_element(By.XPATH, "//i\['@class=slicer-dropdown-popup visual themeableElement'\]").click()time.sleep(5) #this is the part where the code breaks, when I try to clear the search bardriver.find_element(By.XPATH, "//i\['@class=searchInput'\]").clear()

Viewing all articles
Browse latest Browse all 16536

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>