Skip to content

Commit 5775270

Browse files
github-actions[bot]github-actions[bot]
authored andcommitted
updated
1 parent 4c4caf3 commit 5775270

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/modules/WebDriver.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1979,6 +1979,19 @@ $I->seeNumberOfElements('tr', [0,10]); // between 0 and 10 elements
19791979
__not documented__
19801980

19811981

1982+
#### seeNumberOfTabs
1983+
1984+
Checks current number of opened tabs
1985+
1986+
{% highlight php %}
1987+
1988+
<?php
1989+
$I->seeNumberOfTabs(2);
1990+
1991+
{% endhighlight %}
1992+
* `param` $number number of tabs
1993+
1994+
19821995
#### seeOptionIsSelected
19831996

19841997
Checks that the given option is selected.
@@ -2367,6 +2380,32 @@ $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webd
23672380
* `param string|null` $name
23682381
23692382
2383+
#### type
2384+
2385+
Type in characters on active element.
2386+
With a second parameter you can specify delay between key presses.
2387+
2388+
{% highlight php %}
2389+
2390+
<?php
2391+
// activate input element
2392+
$I->click('#input');
2393+
2394+
// type text in active element
2395+
$I->type('Hello world');
2396+
2397+
// type text with a 1sec delay between chars
2398+
$I->type('Hello World', 1);
2399+
2400+
{% endhighlight %}
2401+
2402+
This might be useful when you an input reacts to typing and you need to slow it down to emulate human behavior.
2403+
For instance, this is how Credit Card fields can be filled in.
2404+
2405+
* `param` $text
2406+
* `param` $delay [sec]
2407+
2408+
23702409
#### typeInPopup
23712410
23722411
Enters text into a native JavaScript prompt popup, as created by `window.prompt`.

0 commit comments

Comments
 (0)