0

How can I handle elements that are inside iframe which are again inside a shadow Dom using watir 7.2?

Something like this:

<div id="test">

#shadow-root (open)

<div id= "test1">

<iframe id= "iframe">

<input id = "text field">

Code-

shadow_host=@browser.div(id: 'test')

shadow_root=shadow_host.shadow_root

iframe= shadow_root.iframe(id: 'iframe').wai_until(&: present?)

iframe.text_fied(id: 'text field').set(params[:expiry] ||12345)

Please let me know what mistake I am doing?

0 Answers0