File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -3430,6 +3430,20 @@ public function openNewTab()
3430
3430
$ this ->switchToNextTab ();
3431
3431
}
3432
3432
3433
+ /**
3434
+ * Checks current number of opened tabs
3435
+ *
3436
+ * ```php
3437
+ * <?php
3438
+ * $I->seeNumberOfTabs(2);
3439
+ * ```
3440
+ * @param $number number of tabs
3441
+ */
3442
+ public function seeNumberOfTabs ($ number )
3443
+ {
3444
+ $ this ->assertEquals (count ($ this ->webDriver ->getWindowHandles ()), $ number );
3445
+ }
3446
+
3433
3447
/**
3434
3448
* Closes current browser tab and switches to previous active tab.
3435
3449
*
Original file line number Diff line number Diff line change @@ -393,12 +393,14 @@ public function testAppendFieldText()
393
393
394
394
public function testTypeOnTextField ()
395
395
{
396
+
396
397
$ this ->module ->amOnPage ('/form/field ' );
397
398
$ this ->module ->fillField ('form #name ' , '' );
398
399
$ this ->module ->type ('Hello world ' );
399
400
$ this ->module ->click ('Submit ' );
400
401
$ form = data::get ('form ' );
401
402
$ this ->assertEquals ('Hello world ' , $ form ['name ' ]);
403
+
402
404
}
403
405
404
406
public function testAppendFieldTextFails ()
@@ -1033,6 +1035,7 @@ public function testBrowserTabs()
1033
1035
$ this ->module ->seeInCurrentUrl ('example2 ' );
1034
1036
$ this ->module ->switchToNextTab (2 );
1035
1037
$ this ->module ->seeInCurrentUrl ('example1 ' );
1038
+ $ this ->module ->seeNumberOfTabs (3 );
1036
1039
}
1037
1040
1038
1041
public function testPerformOnWithArray ()
You can’t perform that action at this time.
0 commit comments