예제 #1
0
 /**
  * Switch to another frame
  *
  * Example:
  * ``` html
  * <iframe name="another_frame" src="http://example.com">
  *
  * ```
  *
  * ``` php
  * <?php
  * # switch to iframe
  * $I->switchToIFrame("another_frame");
  * # switch to parent page
  * $I->switchToIFrame();
  *
  * ```
  *
  * @param string|null $name
  */
 public function switchToIFrame($name = null) {
 	if (is_null($name)) {
 		$this->webDriver->switchTo()->defaultContent();
 	} else {
     	$this->webDriver->switchTo()->frame($name);	
 	}
 }
예제 #2
0
 /**
  * Switch to another frame
  *
  * Example:
  * ``` html
  * <iframe name="another_frame" src="http://example.com">
  *
  * ```
  *
  * ``` php
  * <?php
  * # switch to iframe
  * $I->switchToIFrame("another_frame");
  * # switch to parent page
  * $I->switchToIFrame();
  *
  * ```
  *
  * @param string|null $name
  */
 public function switchToIFrame($name = null)
 {
     $this->webDriver->switchTo()->frame($name);
 }