Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 1
    is this relevant to python? Commented Aug 12, 2019 at 12:37
  • Good catch, I've removed the unnecessary "var" from this variable and the semicolons Commented Aug 12, 2019 at 12:45
  • Thank you for your prompt reply. Yes, I want to get the text of these emails. In HTML (document.getElementById("mails").textContent) all emails are presented together. No loop is required. Mails are not presented in HTML page source. Your code caused exception 'WebElement' object has no attribute 'getAttribute'. Commented Aug 12, 2019 at 13:10
  • That's because it should be get_attribute instead of this getAttribute, I've updated the answer Commented Aug 13, 2019 at 11:10