Skip to content

Commit 4857f30

Browse files
committed
Use double quotes and go_to
1 parent 80346f8 commit 4857f30

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/ferrum/page/frames.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def frames_subscribe
7575
frame_id = params.dig("context", "auxData", "frameId")
7676

7777
unless @main_frame.id
78-
root_frame = command('Page.getFrameTree').dig('frameTree', 'frame', 'id')
78+
root_frame = command("Page.getFrameTree").dig("frameTree", "frame", "id")
7979
if frame_id == root_frame
8080
@main_frame.id = frame_id
8181
@frames[frame_id] = @main_frame

spec/frame_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ module Ferrum
2727
expect(frame.url).to end_with("/ferrum/get_cookie")
2828
end
2929

30-
it 'finds main frame properly' do
31-
browser.goto("/ferrum/popup_frames")
30+
it "finds main frame properly" do
31+
browser.go_to("/ferrum/popup_frames")
32+
3233
browser.at_xpath("//a[text()='pop up']").click
34+
3335
expect(browser.pages.size).to eq(2)
3436
opened_page = browser.pages.last
3537
expect(opened_page.main_frame.url).to end_with("/frames")

0 commit comments

Comments
 (0)