Anusha Singh

Anusha Singh

  • 2.2k
  • 27
  • 3.3k

Unable to enter value in Textbox which is inside shadow root

Jan 21 2022 4:55 AM

Hi Friends 

My xpath is working fine till chrome browser 94 version .but now its upgarde with 97 .

When i am going to run the code i am getting an exception like 

and My code is which is working fine previously .

protected void postcode(string value)
            IWebElement tag = driver.FindElement(By.TagName("address-lookup"));
            IJavaScriptExecutor js = (IJavaScriptExecutor)driver;            
            IWebElement ele = (IWebElement)js.ExecuteScript("return arguments[0].shadowRoot", tag);
             ele.FindElement(By.Id("ngPostCode")).SendKeys("RG21 4EA");


Can any one help me out with chrome 97 version .DOM look like this