@@ -237,7 +237,7 @@ public function restartBrowser($contextOptions = null)
237
237
return $ this ->sendCommand ('restartBrowser ' , [$ contextOptions ]);
238
238
}
239
239
240
- public function refreshPage ()
240
+ public function reloadPage ()
241
241
{
242
242
return $ this ->sendCommand ('refreshPage ' );
243
243
}
@@ -482,6 +482,13 @@ public function seeCurrentUrlEquals($uri)
482
482
return $ this ->sendCommand ('seeCurrentUrlEquals ' , [$ uri ]);
483
483
}
484
484
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
+
485
492
public function dontSeeCurrentUrlEquals ($ uri )
486
493
{
487
494
return $ this ->sendCommand ('dontSeeCurrentUrlEquals ' , [$ uri ]);
@@ -512,7 +519,7 @@ public function grabBrowserLogs()
512
519
return $ this ->sendCommand ('grabBrowserLogs ' );
513
520
}
514
521
515
- public function grabCurrentUrl ()
522
+ public function grabFromCurrentUrl ()
516
523
{
517
524
return $ this ->sendCommand ('grabCurrentUrl ' );
518
525
}
@@ -574,7 +581,7 @@ public function clearCookie()
574
581
return $ this ->sendCommand ('clearCookie ' );
575
582
}
576
583
577
- public function executeScript ($ fn , $ arg = null )
584
+ public function executeJS ($ fn , $ arg = null )
578
585
{
579
586
return $ this ->sendCommand ('executeScript ' , [$ fn , $ arg ]);
580
587
}
@@ -692,12 +699,12 @@ public function waitForElement($locator, $sec = null)
692
699
return $ this ->sendCommand ('waitForElement ' , [$ locator , $ sec ]);
693
700
}
694
701
695
- public function waitForVisible ($ locator , $ sec = null )
702
+ public function waitForElementVisible ($ locator , $ sec = null )
696
703
{
697
704
return $ this ->sendCommand ('waitForVisible ' , [$ locator , $ sec ]);
698
705
}
699
706
700
- public function waitForInvisible ($ locator , $ sec = null )
707
+ public function waitForElementNotVisible ($ locator , $ sec = null )
701
708
{
702
709
return $ this ->sendCommand ('waitForInvisible ' , [$ locator , $ sec ]);
703
710
}
@@ -727,7 +734,7 @@ public function switchToIFrame($locator = null)
727
734
return $ this ->sendCommand ('switchTo ' , [$ locator ]);
728
735
}
729
736
730
- public function waitForFunction ($ fn , $ argsOrSec = null , $ sec = null )
737
+ public function waitForJS ($ fn , $ argsOrSec = null , $ sec = null )
731
738
{
732
739
return $ this ->sendCommand ('waitForFunction ' , [$ fn , $ argsOrSec , $ sec ]);
733
740
}
@@ -747,6 +754,11 @@ public function waitForDetached($locator, $sec = null)
747
754
return $ this ->sendCommand ('waitForDetached ' , [$ locator , $ sec ]);
748
755
}
749
756
757
+ public function waitForElementClickable ($ locator , $ sec = null )
758
+ {
759
+ return $ this ->sendCommand ('waitForClickable ' , [$ locator , $ sec ]);
760
+ }
761
+
750
762
public function waitForCookie ($ name , $ sec = null )
751
763
{
752
764
return $ this ->sendCommand ('waitForCookie ' , [$ name , $ sec ]);
0 commit comments