Skip to content

Make find_elements functions generators. #1

@TannerBaldus

Description

@TannerBaldus

I found when using find_elements when there was a lot of elements took a bit of time. I think some execution time could be saved if they find_elements didn't return a list but instead was a generator.
I haven't tested to see if the list or the selenium search was the main culprit of the delay. But I thought I'd bring it up with you since you might have some insight into that.

One possible con I could think of changing over to a generator would be that sometimes it would be useful to be able manipulate elements based off the index. However with a generator a dev could easily cast to list if she wants.

If this sounds like something that you'd like to incorporate, I'll work on it in a bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions