I am attempting to write automation tests for the front-end UI of an app , that has a lot of nested shadow-doms and I am unable to access them using the Capybara, Cucumber & Selenium (using chromedriver). The app is using AWS Amplify Authenticator . I keep getting the following error when I try to find an input element :
Unable to find css "input[id$='username']" (Capybara::ElementNotFound)
This is what my test looks like:
When('I type into the username field my {string}') do |string| find("input[id$='username']").set(string) end
I have read on other posts that chrome driver supports shadow-doms but not sure how it would be handled in this scenario