@@ -26,7 +26,7 @@ public void TearDownMethod()
26
26
public void CanClickOnALinkAndFollowIt ( )
27
27
{
28
28
driver . FindElement ( By . Id ( "normal" ) ) . Click ( ) ;
29
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
29
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
30
30
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
31
31
}
32
32
@@ -36,7 +36,7 @@ public void CanClickOnALinkThatOverflowsAndFollowIt()
36
36
{
37
37
driver . FindElement ( By . Id ( "overflowLink" ) ) . Click ( ) ;
38
38
39
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
39
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
40
40
}
41
41
42
42
[ Test ]
@@ -113,7 +113,7 @@ public void CanClickOnAnElementWithTopSetToANegativeNumber()
113
113
public void ShouldClickOnFirstBoundingClientRectWithNonZeroSize ( )
114
114
{
115
115
driver . FindElement ( By . Id ( "twoClientRects" ) ) . Click ( ) ;
116
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
116
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
117
117
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
118
118
}
119
119
@@ -155,7 +155,7 @@ public void ShouldOnlyFollowHrefOnce()
155
155
int windowHandlesBefore = driver . WindowHandles . Count ;
156
156
157
157
driver . FindElement ( By . Id ( "new-window" ) ) . Click ( ) ;
158
- WaitFor ( ( ) => { return driver . WindowHandles . Count >= windowHandlesBefore + 1 ; } ) ;
158
+ WaitFor ( ( ) => { return driver . WindowHandles . Count >= windowHandlesBefore + 1 ; } , "Window handles was not " + ( windowHandlesBefore + 1 ) . ToString ( ) ) ;
159
159
Assert . AreEqual ( windowHandlesBefore + 1 , driver . WindowHandles . Count ) ;
160
160
}
161
161
@@ -181,39 +181,39 @@ public void ClickingLabelShouldSetCheckbox()
181
181
public void CanClickOnALinkWithEnclosedImage ( )
182
182
{
183
183
driver . FindElement ( By . Id ( "link-with-enclosed-image" ) ) . Click ( ) ;
184
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
184
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
185
185
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
186
186
}
187
187
188
188
[ Test ]
189
189
public void CanClickOnAnImageEnclosedInALink ( )
190
190
{
191
191
driver . FindElement ( By . Id ( "link-with-enclosed-image" ) ) . FindElement ( By . TagName ( "img" ) ) . Click ( ) ;
192
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
192
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
193
193
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
194
194
}
195
195
196
196
[ Test ]
197
197
public void CanClickOnALinkThatContainsTextWrappedInASpan ( )
198
198
{
199
199
driver . FindElement ( By . Id ( "link-with-enclosed-span" ) ) . Click ( ) ;
200
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
200
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
201
201
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
202
202
}
203
203
204
204
[ Test ]
205
205
public void CanClickOnALinkThatContainsEmbeddedBlockElements ( )
206
206
{
207
207
driver . FindElement ( By . Id ( "embeddedBlock" ) ) . Click ( ) ;
208
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
208
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
209
209
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
210
210
}
211
211
212
212
[ Test ]
213
213
public void CanClickOnAnElementEnclosedInALink ( )
214
214
{
215
215
driver . FindElement ( By . Id ( "link-with-enclosed-span" ) ) . FindElement ( By . TagName ( "span" ) ) . Click ( ) ;
216
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
216
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
217
217
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
218
218
}
219
219
@@ -222,7 +222,7 @@ public void ShouldBeAbleToClickLinkContainingLineBreak()
222
222
{
223
223
driver . Url = simpleTestPage ;
224
224
driver . FindElement ( By . Id ( "multilinelink" ) ) . Click ( ) ;
225
- WaitFor ( ( ) => { return driver . Title == "We Arrive Here" ; } ) ;
225
+ WaitFor ( ( ) => { return driver . Title == "We Arrive Here" ; } , "Browser title was not 'We Arrive Here'" ) ;
226
226
Assert . AreEqual ( "We Arrive Here" , driver . Title ) ;
227
227
}
228
228
@@ -242,7 +242,7 @@ public void ClicksASurroundingStrongTag()
242
242
{
243
243
driver . Url = EnvironmentManager . Instance . UrlBuilder . WhereIs ( "ClickTest_testClicksASurroundingStrongTag.html" ) ;
244
244
driver . FindElement ( By . TagName ( "a" ) ) . Click ( ) ;
245
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
245
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
246
246
}
247
247
248
248
[ Test ]
@@ -255,15 +255,15 @@ public void CanClickAnImageMapArea()
255
255
{
256
256
driver . Url = EnvironmentManager . Instance . UrlBuilder . WhereIs ( "click_tests/google_map.html" ) ;
257
257
driver . FindElement ( By . Id ( "rectG" ) ) . Click ( ) ;
258
- WaitFor ( ( ) => { return driver . Title == "Target Page 1" ; } ) ;
258
+ WaitFor ( ( ) => { return driver . Title == "Target Page 1" ; } , "Browser title was not 'Target Page 1'" ) ;
259
259
260
260
driver . Url = EnvironmentManager . Instance . UrlBuilder . WhereIs ( "click_tests/google_map.html" ) ;
261
261
driver . FindElement ( By . Id ( "circleO" ) ) . Click ( ) ;
262
- WaitFor ( ( ) => { return driver . Title == "Target Page 2" ; } ) ;
262
+ WaitFor ( ( ) => { return driver . Title == "Target Page 2" ; } , "Browser title was not 'Target Page 2'" ) ;
263
263
264
264
driver . Url = EnvironmentManager . Instance . UrlBuilder . WhereIs ( "click_tests/google_map.html" ) ;
265
265
driver . FindElement ( By . Id ( "polyLE" ) ) . Click ( ) ;
266
- WaitFor ( ( ) => { return driver . Title == "Target Page 3" ; } ) ;
266
+ WaitFor ( ( ) => { return driver . Title == "Target Page 3" ; } , "Browser title was not 'Target Page 3'" ) ;
267
267
}
268
268
269
269
[ Test ]
@@ -276,7 +276,7 @@ public void ShouldBeAbleToClickOnAnElementGreaterThanTwoViewports()
276
276
277
277
element . Click ( ) ;
278
278
279
- WaitFor ( ( ) => { return driver . Title == "clicks" ; } ) ;
279
+ WaitFor ( ( ) => { return driver . Title == "clicks" ; } , "Browser title was not 'clicks'" ) ;
280
280
}
281
281
282
282
[ Test ]
@@ -298,7 +298,7 @@ public void ShouldBeAbleToClickOnAnElementInFrameGreaterThanTwoViewports()
298
298
299
299
element . Click ( ) ;
300
300
301
- WaitFor ( ( ) => { return driver . Title == "clicks" ; } ) ;
301
+ WaitFor ( ( ) => { return driver . Title == "clicks" ; } , "Browser title was not 'clicks'" ) ;
302
302
}
303
303
304
304
[ Test ]
@@ -308,7 +308,7 @@ public void ShouldBeAbleToClickOnLinkInAbsolutelyPositionedFooter()
308
308
driver . Url = url ;
309
309
310
310
driver . FindElement ( By . Id ( "link" ) ) . Click ( ) ;
311
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
311
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
312
312
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
313
313
}
314
314
@@ -319,7 +319,7 @@ public void ShouldBeAbleToClickOnLinkInAbsolutelyPositionedFooterInQuirksMode()
319
319
driver . Url = url ;
320
320
321
321
driver . FindElement ( By . Id ( "link" ) ) . Click ( ) ;
322
- WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } ) ;
322
+ WaitFor ( ( ) => { return driver . Title == "XHTML Test Page" ; } , "Browser title was not 'XHTML Test Page'" ) ;
323
323
Assert . AreEqual ( "XHTML Test Page" , driver . Title ) ;
324
324
}
325
325
}
0 commit comments