听起来像你想要的
isElementPresent(...locator of element...)。例如:
$cell = "//table[@name='tableName']//tr[".$r."]/td[".$c."]";$foundlink = $this->isElementPresent("xpath=".$cell."/a[.='".linktext."']");$foundButton = $this->isElementPresent("xpath=".$cell."/button[@type='button']");$foundImage = $this->isElementPresent("xpath=".$cell."/img[ends-with(@src='pretty-pony.gif')]");
isElementPresent()``true如果是,
false则返回,否则返回。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)