Skip to content

Commit d71f381

Browse files
author
Justin Bishop
committed
new readme
Summary: Reviewers: Test Plan: Task ID:
1 parent 4831521 commit d71f381

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,46 @@ Most clients require you to first read the protocol to see what's possible, then
1010
Each command is just the name of a function call, and each additional path is just another chained function call. The function parameter is then either an array() if the command takes JSON parameters, or an individual primitive if it takes a URL parameter.
1111

1212
## SIMPLE EXAMPLES
13+
1314
### Note that all of these match the Protocol exactly
1415

1516
* Get a session (opens a new browser window)
1617

17-
$web_driver = new WebDriver(); // could pass a host besides localhost
18+
$web_driver = new WebDriver(); // could pass a host besides localhost
1819

1920
$session = $web_driver->session(); // could pass a browser name
2021

2122
* Move to a specific spot on the screen
2223

23-
$session->moveto(array('xoffset' => 3, 'yoffset' => 300));
24+
$session->moveto(array('xoffset' => 3, 'yoffset' => 300));
2425

2526
* Change asynchronous script timeout
2627

27-
$session->timeouts()->async_script(array('ms' => 2000));
28+
$session->timeouts()->async_script(array('ms' => 2000));
2829

2930
* Touch screen
3031

31-
$session->touch()->scroll($element->getID())
32+
$session->touch()->scroll($element->getID())
3233

3334
* Check if two elements are equal
3435

35-
$element->equals($other_element->getID()))
36+
$element->equals($other_element->getID()))
3637

3738
* Get value of css property on element
3839

39-
$element->css($property_name)
40+
$element->css($property_name)
4041

4142
## 'GET', 'POST', or 'DELETE' to the same command examples
4243

4344
### If you can do multiple http methods for the same command, such as 'orientation', where 'POST' changes the orientation but 'GET' fetches it, call the command directly for the getter, and prepend the http method for the writers.
4445

4546
* Set landscape orientation
4647

47-
$session->postOrientation(array('orientation' => 'LANDSCAPE'));
48+
$session->postOrientation(array('orientation' => 'LANDSCAPE'));
4849

4950
* Get landscape orientation
5051

51-
$session->orientation();
52+
$session->orientation();
5253

5354
## A few Element/Cookie/Session/Window convenience exceptions.
5455

0 commit comments

Comments
 (0)