How do I capture text using Selenium WebDriver in Python
This issue occurs when trying to get text using Selenium WebDriver by utilizing the getText() method with a parameter passed into it.
To fix it, simply use .text instead.
Remember to verify the text after obtaining it, rather than attempting to pass in the expected text during the retrieval process.
Here's how the code should look like:
text = driver.find_element_by_class_name("current-stage").text
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3