Attempt to access the attribute of a shadow element resulted in encountering
ElementNotVisibleException Element with CSS input[type='checkbox'] is not present on screen
<checkbox _ngcontent-ebv-c14="" label="User Access" ng-version="8.0.3" class="ng-star-inserted">
#shadow-root(open)
<label>
<input type="checkbox" name="" value="true">
<span class="checkmark"></span>
<!---->
<span class="label">User Access</span>
</label>
</checkbox>
Utilizing Selenium for fetching the element's attribute
WebElement parentElement = webdriver.findElement(By.xpath("//checkbox[@label='User Access']"));
webdriver.getShadowElement(parentElement,"input[type='checkbox']").getAttribute("value").contains("true");
Is there anything I overlooked?