Skip to content

[Beginner] Elements & Chrome Extension Page #2529

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

You must be logged in to vote

Answer to question 1:

elements = sb.find_elements("*")

For example, here's a script that prints out the tag name of all the elements on a page:

from seleniumbase import SB

with SB(uc=True) as sb:
    sb.open("https://seleniumbase.io/demo_page")
    elements = sb.find_elements("*")
    print(len(elements))
    for element in elements:
        print(element.tag_name)

Answer to question 2:

The chrome://extensions/ page has a lot of Shadow DOM. You'll need to pierce through that to perform actions. Here are some examples that use Shadow DOM: (These use the BaseCase format. See Syntax Formats.)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@SirFunneh
Comment options

@mdmintz
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