casperjs + selenium 怎么定位iframe元素?
casper.then(function SetHaulier(){
test.comment("Set Haulier");
driver = webdriver.PhantomJS();
driver.switch_to.frame(0);
content = driver.page_source.encode('utf-8');
//driver.switch_to.frame(0);
//require('utils').dump(this.getElementBounds('//html/body/form/div[1]/div[2]/iframe'));
this.click(xPath("//tr/td[7]/a/span"));
casper.wait(5000,function Sleep(){
casper.capture(config.captureDir+"/WMC Dashboard (Ligentia)/DCBook/09-ClickDCBookLink.png");
});
});
页面Html
MYYA
相关分类