@@ -28,33 +28,33 @@ class BiDi
28
28
29
29
it 'can create a browsing context for given id' do
30
30
id = driver . window_handle
31
- browsing_context = BrowsingContext . new ( driver : driver , browsing_context_id : id )
31
+ browsing_context = described_class . new ( driver : driver , browsing_context_id : id )
32
32
expect ( browsing_context . id ) . to eq ( id )
33
33
end
34
34
35
35
it 'can create a window' do
36
- browsing_context = BrowsingContext . new ( driver : driver , type : :window )
36
+ browsing_context = described_class . new ( driver : driver , type : :window )
37
37
expect ( browsing_context . id ) . not_to be_nil
38
38
end
39
39
40
40
it 'can create a window with a reference context' do
41
- browsing_context = BrowsingContext . new ( driver : driver , type : :window ,
41
+ browsing_context = described_class . new ( driver : driver , type : :window ,
42
42
reference_context : driver . window_handle )
43
43
expect ( browsing_context . id ) . not_to be_nil
44
44
end
45
45
46
46
it 'can create a tab' do
47
- browsing_context = BrowsingContext . new ( driver : driver , type : :tab )
47
+ browsing_context = described_class . new ( driver : driver , type : :tab )
48
48
expect ( browsing_context . id ) . not_to be_nil
49
49
end
50
50
51
51
it 'can create a tab with a reference context' do
52
- browsing_context = BrowsingContext . new ( driver : driver , type : :tab , reference_context : driver . window_handle )
52
+ browsing_context = described_class . new ( driver : driver , type : :tab , reference_context : driver . window_handle )
53
53
expect ( browsing_context . id ) . not_to be_nil
54
54
end
55
55
56
56
it 'can navigate to a url' do
57
- browsing_context = BrowsingContext . new ( driver : driver , type : :tab )
57
+ browsing_context = described_class . new ( driver : driver , type : :tab )
58
58
59
59
info = browsing_context . navigate url : url_for ( '/bidi/logEntryAdded.html' )
60
60
@@ -64,7 +64,7 @@ class BiDi
64
64
end
65
65
66
66
it 'can navigate to a url with readiness state' do
67
- browsing_context = BrowsingContext . new ( driver : driver , type : :tab )
67
+ browsing_context = described_class . new ( driver : driver , type : :tab )
68
68
69
69
info = browsing_context . navigate url : url_for ( '/bidi/logEntryAdded.html' ) ,
70
70
readiness_state : :complete
@@ -76,7 +76,7 @@ class BiDi
76
76
77
77
it 'can get tree with a child' do
78
78
browsing_context_id = driver . window_handle
79
- parent_window = BrowsingContext . new ( driver : driver , browsing_context_id : browsing_context_id )
79
+ parent_window = described_class . new ( driver : driver , browsing_context_id : browsing_context_id )
80
80
parent_window . navigate ( url : url_for ( 'iframes.html' ) ,
81
81
readiness_state : :complete )
82
82
@@ -88,7 +88,7 @@ class BiDi
88
88
89
89
it 'can get tree with depth' do
90
90
browsing_context_id = driver . window_handle
91
- parent_window = BrowsingContext . new ( driver : driver , browsing_context_id : browsing_context_id )
91
+ parent_window = described_class . new ( driver : driver , browsing_context_id : browsing_context_id )
92
92
parent_window . navigate ( url : url_for ( 'iframes.html' ) ,
93
93
readiness_state : :complete )
94
94
@@ -98,8 +98,8 @@ class BiDi
98
98
end
99
99
100
100
it 'can close a window' do
101
- window1 = BrowsingContext . new ( driver : driver , type : :window )
102
- window2 = BrowsingContext . new ( driver : driver , type : :window )
101
+ window1 = described_class . new ( driver : driver , type : :window )
102
+ window2 = described_class . new ( driver : driver , type : :window )
103
103
104
104
window2 . close
105
105
0 commit comments