'How to click text that is under #shadow-root Python

Could you help me how to write a code in python to click on the text "CORRETORA DE SEGUROS". They are inside a Shadow and I'm not getting an adequate result.

<ion-radio class="sc-ion-select-popover md in-item interactive radio-checked hydrated" aria-checked="true" aria-labelledby="ion-rb-1-lbl" role="radio" tabindex="0"></ion-radio>
   #shadow-root (open)
    <div class="radio-icon" part="container"><div class="radio-inner" part="mark"></div><div class="radio-ripple"></div></div>
    <label for="ion-rb-1"> CORRETORA DE SEGUROS </label>
    <input type="radio" tabindex="-1" id="ion-rb-1">

I've already tried in Python

shadow = navegador.execute_script('''return //ion-radio[@role="radio"]''')
shadow.find_element_by_css(".sc-ion-select-popover.md.in-item.interactive.hydrated")

I have this information by SelectorHubs maybe can help.

String cssSelectorForHost1 = ".sc-ion-select-popover.md.in-item.interactive.hydrated";
Thread.sleep(1000);
SearchContext shadow = driver.findElement(By.cssSelector(".sc-ion-select-popover.md.in-item.interactive.hydrated")).getShadowRoot();
Thread.sleep(1000);
shadow.findElement(By.cssSelector("label[for="ion-rb-2"]"));


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source