3

I'm looking to access to the button but the CLOSED shadow DOM block me, how can i switch it to open and have access to this button ?

<div class="button-holder help-button-holder">
  #shadow-root (closed)
    <link rel="stylesheet" href="chrome-extension://mpbjkejclgfgadiemmefgebjfooflfhl/src/solve/solver-button.css">
    <button tabindex="0" title="Solve the challenge" id="solver-button"></button>
</div>

2

1 Answer 1

1

I have encounter the same problem and manager to work around it.

So the idea is to focus on the closest element before "shadow-root (closed)", then use Tab key to reach that solver button, then click it.

I work on Kotlin, but you should be able to attempt for python.

// click to focus on the solver button wrapper
driver.findElement(By.cssSelector(".button-holder.help-button-holder")).click()

// use Actions instead of pointing to the solver button itself
val actions = Actions(driver)
actions.sendKeys(Keys.TAB)
actions.click()
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.