Skip to content

Commit

Permalink
update candidate_listTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kongtiaowang committed Nov 5, 2024
1 parent c142809 commit 69f2321
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions modules/candidate_list/test/candidate_listTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,22 +309,20 @@ function testDataEntryAndOpenProfile()
$this->safeGet($this->url . "/candidate_list/");
//click open profile button
$btn = self::$openProfile;
$this->safeClick(WebDriverBy::cssSelector($btn));
$this->safeClick(WebDriverBy::cssSelector($btn),1);
// input PSCID and DCCID
$dccid = "#lorisworkspace > div > div:nth-child(1) > div >".
" div:nth-child(2)>form>div>div:nth-child(1)>div>div>input";
$pscid = "#lorisworkspace > div > div:nth-child(1) > div >".
" div:nth-child(2)>form>div>div:nth-child(2)>div>div>input";
$dccid = 'input[name="CandID"]:nth-child(1)';
$pscid = 'input[name="PSCID"]:nth-child(1)';
// to do react input value
$this->safeFindElement(
WebDriverBy::cssSelector($dccid)
WebDriverBy::cssSelector($dccid),1
)->sendKeys('300001');
$this->safeFindElement(
WebDriverBy::cssSelector($pscid)
WebDriverBy::cssSelector($pscid),1
)->sendKeys('MTL001');
$btn = ".col-sm-12 > .row .btn";
//to do check the url
$this->safeClick(WebDriverBy::cssSelector($btn));
$this->safeClick(WebDriverBy::cssSelector($btn),1);
sleep(2);
$URL = $this->webDriver->executeScript("return window.location.href;");
$this->assertStringContainsString("300001", $URL);
Expand Down

0 comments on commit 69f2321

Please sign in to comment.