I use newest Chrome and chromedriver.
I have a website with DOM elements and i will type any text in an inputfield
HTML Code (sorry for screenshot)
Python Code:
#Expand Shadow
def expand_shadow_element(element):
shadow_root = driver.execute_script('return arguments[0].shadowRoot.children', element)
return shadow_root
...
root1 = driver.find_element_by_id("UI-tf_Vorgangsname")
shadow_root1 = expand_shadow_element(root1)
root2 = shadow_root1
Do you have any idea?
Many Thanks!
CodePudding user response:
I have a solution.
Sendkeys doesn't work, but i found a hybrid solution.
I use this Python script without send_keys, and i use robotframework kernsystem.
xy.robot file
...
${Element}= Get Element ID Input UI-tf_Vorgnagsname
Press Keys ${Element} Test text
...
So i can write in this input field.