Hi, I have installed Selenium IDE on Firefox and manage to record and play various web navigation sequences. What I need is to do it all automated through PHP, i.e. run a PHP script which gets the html source of the final page (i.e. at end of navigation sequence). Within Selenium there is an option to export to PHP, so I get something like
class Example extends PHPUnit_Extensions_SeleniumTestCase { function setUp() { $this->setBrowser("*chrome"); $this->setBrowserUrl("http://www.example.com/"); }
function testMyTestCase() { $this->open("/"); $this->click("link=24"); $this->waitForPageToLoad("30000"); $this->click("link=Test2"); $this->waitForPageToLoad("30000"); $this->click("//td[4]/a/img"); $this->waitForPageToLoad("30000"); $this->type("username", "user"); $this->type("password", "pass"); $this->click("//input[@name='login']"); $this->waitForPageToLoad("30000"); } }
Although I can use this in my PHP code, it doesnt seem to do anything (since its just a class definition I guess). How do I get that last source page? Note that I do not want my PHP code to do the navigation on screen, instead I would then like to process that final source code further within PHP.
Thanks for any clues