Skip to content

Commit 1abc2d9

Browse files
committed
fixed incompatibilities
1 parent 90e650d commit 1abc2d9

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/Playwright.php

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function restartBrowser($contextOptions = null)
237237
return $this->sendCommand('restartBrowser', [$contextOptions]);
238238
}
239239

240-
public function refreshPage()
240+
public function reloadPage()
241241
{
242242
return $this->sendCommand('refreshPage');
243243
}
@@ -482,6 +482,13 @@ public function seeCurrentUrlEquals($uri)
482482
return $this->sendCommand('seeCurrentUrlEquals', [$uri]);
483483
}
484484

485+
public function seeCurrentUrlMatches($regexp)
486+
{
487+
$url = $this->sendCommand('grabCurrentUrl');
488+
489+
$this->assertMatchesRegularExpression($regexp, $url, 'URL doesn\'t match the regular expression');
490+
}
491+
485492
public function dontSeeCurrentUrlEquals($uri)
486493
{
487494
return $this->sendCommand('dontSeeCurrentUrlEquals', [$uri]);
@@ -512,7 +519,7 @@ public function grabBrowserLogs()
512519
return $this->sendCommand('grabBrowserLogs');
513520
}
514521

515-
public function grabCurrentUrl()
522+
public function grabFromCurrentUrl()
516523
{
517524
return $this->sendCommand('grabCurrentUrl');
518525
}
@@ -574,7 +581,7 @@ public function clearCookie()
574581
return $this->sendCommand('clearCookie');
575582
}
576583

577-
public function executeScript($fn, $arg = null)
584+
public function executeJS($fn, $arg = null)
578585
{
579586
return $this->sendCommand('executeScript', [$fn, $arg]);
580587
}
@@ -692,12 +699,12 @@ public function waitForElement($locator, $sec = null)
692699
return $this->sendCommand('waitForElement', [$locator, $sec]);
693700
}
694701

695-
public function waitForVisible($locator, $sec = null)
702+
public function waitForElementVisible($locator, $sec = null)
696703
{
697704
return $this->sendCommand('waitForVisible', [$locator, $sec]);
698705
}
699706

700-
public function waitForInvisible($locator, $sec = null)
707+
public function waitForElementNotVisible($locator, $sec = null)
701708
{
702709
return $this->sendCommand('waitForInvisible', [$locator, $sec]);
703710
}
@@ -727,7 +734,7 @@ public function switchToIFrame($locator = null)
727734
return $this->sendCommand('switchTo', [$locator]);
728735
}
729736

730-
public function waitForFunction($fn, $argsOrSec = null, $sec = null)
737+
public function waitForJS($fn, $argsOrSec = null, $sec = null)
731738
{
732739
return $this->sendCommand('waitForFunction', [$fn, $argsOrSec, $sec]);
733740
}
@@ -747,6 +754,11 @@ public function waitForDetached($locator, $sec = null)
747754
return $this->sendCommand('waitForDetached', [$locator, $sec]);
748755
}
749756

757+
public function waitForElementClickable($locator, $sec = null)
758+
{
759+
return $this->sendCommand('waitForClickable', [$locator, $sec]);
760+
}
761+
750762
public function waitForCookie($name, $sec = null)
751763
{
752764
return $this->sendCommand('waitForCookie', [$name, $sec]);

0 commit comments

Comments
 (0)