Closed andresgd7 closed 1 year ago
Dependent of the context, if you using xpath, you might need to use up element to select all below.
Can you post a example here?
Hi david, thanks for answering. Im trying to get a boton wich is inside of a table. Im looking for the button by this way:
from pyshadow.main import Shadow
shadow = Shadow(driver)
shadow.find_elements('siigo-button-atom[class="hydrated"]')
This return me the first element but not all the elements with this properties as a list, im missing something?
An update. By the moment, i get the descendant elements using selenium and scripting. I was looking for an input field.
shadow_root = driver.execute_script("return arguments[0].shadowRoot", driver.find_element(By.CSS_SELECTOR, "HERE>GOES>PARENT>SHADOW>CSS_SELECTOR"))
shadow_root.find_element(By.CSS_SELECTOR, "HERE>GOES>DESCENDANT>SHADOW>CSS_SELECTOR")).send_keys("Cualquier chimbada que vayan a mandar")
i hope this helps someone in the future.
Im trying to get all the rows of a table, but when i use the find_elements method it just return the first coincidence, i'm missing something?