As you can see the console in chrome driver outputs "Maiya Health Frusso 1.0", How do I get that text and print it in python's console?
Asked
Active
Viewed 140 times
0
-
Have you gone through the selenium Docs ? – DollarAkshay Jul 29 '22 at 04:54
-
Try looking at this StackOverflow post: https://stackoverflow.com/questions/20907180/getting-console-log-output-from-chrome-with-selenium-python-api-bindings – KingsDev Jul 29 '22 at 04:57
1 Answers
0
1st find the element using:
element = driver.find_element_by_class_name(<< CLASS NAME >>)
or
element = find_element(By.CLASS_NAME, << CLASS NAME >>)
Then:
print(element.text)

KingKong BigBong
- 193
- 12