I'm trying to make a code to get all the results from a specific search i do on a website.
Unfortunately, I haven't been able to print all the results from the classes i need.
Here is my code:
#Silent Display Settings display = Xvfb() display.start() #Login url = "https://www.foo.com" driver = webdriver.Chrome() #Submit Form if __name__ == "__main__": driver.get(url) select = Select(driver.find_element_by_id('test-make-box')) select.select_by_value('Test') driver.find_element_by_css_selector('.btn.btn-primary.btn--search').click() #Get info WebDriverWait(driver, 100).until( lambda driver: driver.find_element_by_class_name('listing-item__title')) XYZ # Here output results ... driver.quit() display.stop()
Here I need to print all values that come from two classes called listing-item__title
and listing-item__price
, how to do it?