以下是我实施的代码,但它无法正常工作
Random r=new Random();
WebElement treeview = driver.findElement(By.id("ctl00_cphMain_RadTreeView1"));
List<WebElement> treeviewList1 = treeview.findElements(By.cssSelector(".rtIn.myReportNode"));
WebElement MyReportNode=treeviewList1.get(r.nextInt(treeviewList1.size()));
Actions action= new Actions(driver);
action.contextClick(MyReportNode);
action.build().perform();