我正在尝试访问并单击单选按钮,如果尚未单击,它看起来像这样:
<label for="Company4"> </label> ::after
如果单击,它看起来像这样:
<label for="Company4"> </label> ::before ::after
我尝试了JavascriptExecutor和操作
WebElement companyRadio = driver.findElement(By.xpath("//*[@id=\"roleService\"]/table/tbody/tr[2]/td/div[2]/div[1]/label"));
((JavascriptExecutor)driver).executeScript("window.scrollTo(0,"+companyRadio.getLocation().x+")");
companyRadio.click();