コード例 #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
ファイル: WebDriver.php プロジェクト: gargallo/tfs-test
 /**
  * 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);
 }