当我尝试通过以下代码获取属性时,我使用Appium + Selenium2 + Behat + Mink:
$id = $this->getSession()->getPage()->find('xpath', $xpath)->getAttribute("id");
我得到这样的东西:
WebDriver\Execute Object
(
[url:protected] => 0.0.0.0:4723/wd/hub/session/b1892305-af0b-4bf3-a197-3f58d5ef6954/execute
)