Skip to content

Commit 75de701

Browse files
committed
fixing switching of frames
1 parent 4fb607b commit 75de701

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

PHPWebDriver/WebDriverSession.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function touch() {
195195

196196
public function switch_to_frame($frame = null, $curl_opts = array()) {
197197
if (is_a($frame, "PHPWebDriver_WebDriverElement")) {
198-
$frame_id = array("id" => (int)$frame->getId());
198+
$frame_id = array("ELEMENT" => (int)$frame->getId());
199199
} else {
200200
throw new InvalidArgumentException('$frame needs to be a webdriver element of a frame');
201201
}

test/FrameTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public static function tearDownAfterClass() {
1717
}
1818

1919
public function test_frame_stuff() {
20+
$divs = self::$session->elements("css selector", "div");
2021
// find your iframe
2122
$iframe = self::$session->element("css selector", "iframe");
2223
// switch context to it

0 commit comments

Comments
 (0)