clickLinkById() public method

Follows a link by id attribute.
public clickLinkById ( string $id ) : string/boolean
$id string ID attribute value.
return string/boolean
 function testIdLinkFollowing()
 {
     $browser = new SimpleBrowser();
     $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion());
     $browser->get('http://www.lastcraft.com/test/link_confirm.php');
     $this->assertTrue($browser->clickLinkById(1));
     $this->assertPattern('/target for the SimpleTest/', $browser->getContent());
 }
Esempio n. 2
0
 public function testIdLinkFollowing()
 {
     $browser = new SimpleBrowser();
     $browser->addHeader('User-Agent: SimpleTest ' . SimpleTest::getVersion());
     $browser->get($this->samples() . 'link_confirm.php');
     $this->assertTrue($browser->clickLinkById(1));
     $this->assertPattern('/target for the SimpleTest/', $browser->getContent());
 }