예제 #1
0
 public function testLocatingElementPosition()
 {
     $this->assertEquals('(descendant-or-self::p)[position()=1]', Locator::firstElement('p'));
     $this->assertEquals('(descendant-or-self::p)[position()=last()]', Locator::lastElement('p'));
     $this->assertEquals('(descendant-or-self::p)[position()=1]', Locator::elementAt('p', 1));
     $this->assertEquals('(descendant-or-self::p)[position()=last()-0]', Locator::elementAt('p', -1));
     $this->assertEquals('(descendant-or-self::p)[position()=last()-1]', Locator::elementAt('p', -2));
 }
예제 #2
0
 public function test_default_non_editable_department_named_company(SuperUser $i)
 {
     $i->wantTo('Test if default "Company" named department is there and it is non editable');
     $i->login('*****@*****.**');
     $i->clickMenu('HR->Department');
     $i->see('Company', Locator::elementAt('//table/tbody/tr/td', 1));
     $i->dontSeeElementInDOM('table tbody tr:first-child  td:last-child a');
     $i->wantTo('Test Quick Search');
     $i->searchFor('comp');
     $i->see('Company', Locator::elementAt('//table/tbody/tr/td', 1));
     $i->searchFor('xxxxssssss');
     $i->see('No matching records found');
     $i->searchFor('');
     $i->dontSee('No matching records found');
     $i->see('Company', Locator::elementAt('//table/tbody/tr/td', 1));
     $i->click('Active');
     $i->waitPageLoad();
     $i->click('InActive');
     $i->waitPageLoad();
 }
예제 #3
0
 public function testDeleteAndReload($I)
 {
     $url = $I->grabAttributeFrom(Locator::elementAt('//table/tbody/tr[2]/td/a', -1), 'href');
     $I->sendAjaxPostRequest($url . '&reload=1');
     $I->seeResponseCodeIs(302);
     $I->amOnPage($I->grabHttpHeader('X-Redirect'));
     $I->seeNumberOfElements('//table/tbody/tr', 5);
     $I->dontSee('user-5');
 }