phpwebdriver selenium等待ajax

I using selenium with phpwebdriver, I think so its not phpUnit, anyway I am going to load a page that has ajax load and I want to wait until ajax load compelete, I need to get getPageSource complete.

require_once "phpwebdriver/WebDriver.php";

$webdriver = new WebDriver("localhost", "4444");
$webdriver->connect("firefox");                            
$webdriver->get("http://www.hoopabooks.ir/%DA%A9%D8%AA%D8%A7%D8%A8-%D9%87%D8%A7%DB%8C-%D8%AE%D9%88%D8%B1%D8%AF%D9%86%DB%8C");         

$element = $webdriver->getPageSource();
echo ($element);
查看全部
dongyu8694
dongyu8694
2017/08/09 18:12
  • selenium
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复