May-29-2022, 11:28 AM
Do you know that you can copy Css selector or XPath when over tag in inspect?
This is copy of Css selector
This is copy of Css selector
'#bylineInfo > span'
title = browser.find_element(By.CSS_SELECTOR, '#productTitle') print(title.text) publisher = browser.find_element(By.CSS_SELECTOR, '#bylineInfo > span') print(publisher.text)
Output:Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming
Eric Matthes (Author)