We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
$session->element('xpath', "//button[@class='button main-button add-to-cart-button']")->click(); $this->waitForAjax(); $session->element('link text', 'View cart')->click();
Where waitForAjax method is defined as
protected function waitForAjax() { do { sleep(2); } while($this->session->execute(array('script' => 'return jQuery.active', 'args' => array()))); }
This code works only for scripts with jQuery framework.
Original article/Other solutions http://agilesoftwaretesting.com/?p=111