Skip to content

Commit f34986e

Browse files
authored
updates readme
updates readme , add selenium example
1 parent 2c7c9e5 commit f34986e

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,28 @@ print "video is saved at :\"".$screenRecorder->getVideo().'"'.PHP_EOL;
5757
```
5858

5959

60+
### Selenium test example
61+
```php
62+
63+
public function testLoginUserCorrectly()
64+
{
65+
$this->screenRecorder->setScreenSizeToCapture(1920,1080);
66+
$this->screenRecorder->startRecording(__DIR__."/videos/loginCorrectly.flv",2);
67+
$loginInput = [
68+
'username' => 'test',
69+
'password' => 'password'
70+
];
71+
$this->visit('/')
72+
->submitForm("#loginform > form",$loginInput)
73+
->wait(3)
74+
->see("Logout")
75+
->wait(2);
76+
$this->screenRecorder->stopRecording(0);
77+
78+
}
79+
80+
```
81+
6082
## Setting options
6183

6284
The `ffmpeg` shell command accepts different types of options:
@@ -114,4 +136,4 @@ Thanks to all of the contributors ,
114136
fork this repository and send me a pull request
115137

116138
## Author
117-
Dawood Ikhlaq and Open source community
139+
Dawood Ikhlaq and Open source community

0 commit comments

Comments
 (0)