Skip to content

cdp.is_element_present seems to be slow with large number of elements #3929

Answered by mdmintz
LeeMeng2020 asked this question in Q&A
Discussion options

You must be logged in to vote

Using the 'TAG:contains("TEXT")' selector is not efficient, as it's not a real CSS Selector. It has to go through every element with that tag, and then find the text to see if it's a match. If you need the speed, you'll have to use a standard CSS Selector.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LeeMeng2020
Comment options

Answer selected by mdmintz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants