Webdriver.io: Input text/value on shadow element not working in web application using chrome browser
I am using webdriver io for automating web application. Please refer below screenshot which is opened after click action. And I have to enter value in the textbox which is inside of nested shadow elements-
Solution Tried-
I tried to input text using shadow element
status=await driver.execute("document.querySelector('csv-header-desktop').shadowRoot.querySelector('csv-header-store-search').shadowRoot.querySelector('csv-header-modal').shadowRoot.querySelector('input').setValue('12345')");
Solution first not worked
I tried to use Tab and setValue
browser.setValue('input', ['Tab']) browser.setValue('input', '12345')
Directly providing XPATH of that element is not working
Solution #2 also not worked
This is blocker for me now, Can someone please help me how to input text on shadow element. Thanks in advance