如何在selenium webdriver中右键单击选定的telerik radtreeview节点

时间:2016-06-23 06:16:08

标签: java selenium telerik treeview

以下是我实施的代码,但它无法正常工作

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();

0 个答案:

没有答案