Skip to content

Commit 9ba6791

Browse files
author
Justin Bishop
committed
readme again
Summary: Reviewers: Test Plan: Task ID:
1 parent 2022cdc commit 9ba6791

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
11
php-webdriver -- A very thin wrapper of WebDriver
22
=================================================
33

4-
## DESCRIPTION
4+
## DESCRIPTION
55

66
This client aims to be as thin as possible, abusing the dynamic nature of PHP to allow almost all API calls to be a direct transformation of what is defined in the WebDriver protocol itself.
77

88
Most clients require you to first read the protocol to see what's possible, then study the client itself to see how to call it. This hopes to eliminate the latter step, and invites you to rely almost exclusively on http://code.google.com/p/selenium/wiki/JsonWireProtocol
99

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

12-
## SIMPLE EXAMPLES
12+
## SIMPLE EXAMPLES
1313

1414
### Note that all of these match the Protocol exactly
1515

16-
* Get a session (opens a new browser window)
16+
* Get a session (opens a new browser window)
1717

18-
$web_driver = new WebDriver(); // could pass a host besides localhost
19-
$session = $web_driver->session(); // could pass a browser name
18+
$web_driver = new WebDriver(); // could pass a host besides localhost
19+
$session = $web_driver->session(); // could pass a browser name
2020

21-
* Move to a specific spot on the screen
21+
* Move to a specific spot on the screen
2222

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

25-
* Change asynchronous script timeout
25+
* Change asynchronous script timeout
2626

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

29-
* Touch screen
29+
* Touch screen
3030

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

33-
* Check if two elements are equal
33+
* Check if two elements are equal
3434

35-
$element->equals($other_element->getID()))
35+
$element->equals($other_element->getID()))
3636

37-
* Get value of css property on element
37+
* Get value of css property on element
3838

39-
$element->css($property_name)
39+
$element->css($property_name)
4040

4141
## 'GET', 'POST', or 'DELETE' to the same command examples
4242

4343
### 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.
4444

45-
* Set landscape orientation
45+
* Set landscape orientation
4646

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

49-
* Get landscape orientation
49+
* Get landscape orientation
5050

51-
$session->orientation();
51+
$session->orientation();
5252

5353
## A few Element/Cookie/Session/Window convenience exceptions.
5454

0 commit comments

Comments
 (0)