Skip to content

Commit ec305f3

Browse files
authored
Merge pull request #79 from phil-davis/docrev
Minor doc review
2 parents 8a8f8b2 + 48d792a commit ec305f3

File tree

10 files changed

+50
-51
lines changed

10 files changed

+50
-51
lines changed

at-a-glance.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
Mink at a Glance
22
================
33

4-
There's huge number of browser emulators out there, like `Goutte`_, `Selenium`_,
4+
There's a huge number of browser emulators out there, like `Goutte`_, `Selenium`_,
55
`Sahi`_ and others. They all do the same job, but do it very differently.
66
They behave differently and have very different API's. But, what's more important,
7-
there is actually 2 completely different types of browser emulators out there:
7+
there are actually 2 completely different types of browser emulators out there:
88

99
* Headless browser emulators
1010
* Browser controllers
1111

12-
First type browser emulators are simple pure HTTP specification implementations, like
13-
`Goutte`_. Those browser emulators send a real HTTP requests against an application
12+
The first type of browser emulators are simple pure HTTP specification implementations, like
13+
`Goutte`_. Those browser emulators send real HTTP requests against an application
1414
and parse the response content. They are very simple to run and configure,
15-
because this type of emulators can be written in any available programming
16-
language and can be run through console on servers without GUI. Headless
15+
because this type of emulator can be written in any available programming
16+
language and can be run through the console on servers without a GUI. Headless
1717
emulators have both advantages and disadvantages. Advantages are simplicity,
18-
speed and ability to run it without the need of a real browser. But this
19-
type of browsers has one big disadvantage, they have no JS/AJAX support.
18+
speed and ability to run without the need of a real browser. But this
19+
type of browser emulator has one big disadvantage, it has no JS/AJAX support.
2020
So, you can't test your rich GUI web applications with headless browsers.
2121

22-
Second browser emulators type are browser controllers. Those emulators aim
22+
The second type of browser emulators are browser controllers. Those emulators aim
2323
to control the real browser. That's right, a program to control another program.
24-
Browser controllers simulate user interactions on browser and are able to
25-
retrieve actual information from current browser page. `Selenium`_ and `Sahi`_
26-
are the two most famous browser controllers. The main advantage of browser
27-
controllers usage is the support for JS/AJAX interactions on page. The disadvantage
28-
is that such browser emulators require the installed browser, extra configuration
24+
Browser controllers simulate user interactions on the browser and are able to
25+
retrieve actual information from the current browser page. `Selenium`_ and `Sahi`_
26+
are the two most famous browser controllers. The main advantage of using browser
27+
controllers is the support for JS/AJAX interactions on the page. The disadvantage
28+
is that such browser emulators require an installed browser, extra configuration
2929
and are usually much slower than headless counterparts.
3030

3131
So, the easy answer is to choose the best emulator for your project and use
32-
its API for testing. But as we've already seen, both browser emulator types have both
33-
advantages and disadvantages. If you choose headless browser emulator, you
34-
will not be able to test your JS/AJAX pages. And if you choose browser controller,
35-
your overall test suite will become very slow at some point. So, in real
36-
world we should use both! And that's why you need a **Mink**.
32+
its API for testing. But as we've already seen, both browser emulator types have
33+
advantages and disadvantages. If you choose a headless browser emulator, you
34+
will not be able to test your JS/AJAX pages. And if you choose a browser controller,
35+
your overall test suite will become very slow at some point. So, in the real
36+
world we should use both! And that's why you need **Mink**.
3737

3838
**Mink** removes API differences between different browser emulators providing
3939
different drivers (read in :doc:`/guides/drivers` chapter) for every browser
40-
emulator and providing you with the easy way to control the browser (:doc:`/guides/session`),
40+
emulator and providing you with an easy way to control the browser (:doc:`/guides/session`),
4141
traverse pages (:doc:`/guides/traversing-pages`), manipulate page elements
4242
(:doc:`/guides/manipulating-pages`) or interact with them (:doc:`/guides/interacting-with-pages`).
4343

drivers/browserkit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BrowserKitDriver is a pure PHP library available through Composer:
1616
.. note::
1717

1818
The BrowserKit component only provides an abstract implementation. The
19-
actual implementation are provided by other projects, like `Goutte`_
19+
actual implementation is provided by other projects, like `Goutte`_
2020
or the `Symfony HttpKernel`_ component.
2121

2222
If you are using Goutte, you should use the special :doc:`/drivers/goutte`

drivers/sahi.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ SahiDriver
22
==========
33

44
SahiDriver provides a bridge for the `Sahi`_ browser controller. Sahi is
5-
a new JS browser controller, that fast replaced old Selenium testing suite.
5+
a new JS browser controller, that fast replaced the old Selenium testing suite.
66
It's both easier to setup and to use than classical Selenium. It has a GUI
77
installer for each popular operating system out there and is able to control
88
every systems browser through a special bundled proxy server.
@@ -43,7 +43,7 @@ to control it with ``Behat\Mink\Driver\SahiDriver``:
4343
4444
.. note::
4545

46-
Notice, that first argument of ``SahiDriver`` is always a browser name,
46+
Notice, that the first argument of ``SahiDriver`` is always a browser name,
4747
`supported by Sahi`_.
4848

4949
If you want more control during the driver initialization, like for example

guides/drivers.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ types, often written in different languages? Through drivers! A Mink driver
66
is a simple class, that implements ``Behat\Mink\Driver\DriverInterface``.
77
This interface describes bridge methods between Mink and real browser emulators.
88
Mink always talks with browser emulators through its driver. It doesn't know
9-
anything about how to start/stop or traverse page in that particular browser
9+
anything about how to start/stop or traverse pages in that particular browser
1010
emulator. It only knows what driver method it should call in order to do this.
1111

1212
Mink comes with six drivers out of the box:
@@ -26,7 +26,7 @@ Mink comes with six drivers out of the box:
2626
Driver Feature Support
2727
----------------------
2828

29-
Although Mink does its best on removing browser differences between different
29+
Although Mink does its best to remove browser differences between different
3030
browser emulators, it can't do much in some cases. For example, BrowserKitDriver
3131
cannot evaluate JavaScript and Selenium2Driver cannot get the response status
3232
code. In such cases, the driver will always throw a meaningful

guides/interacting-with-pages.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ the links and press the buttons on the page.
1313
.. note::
1414

1515
These methods are actually equivalent internally (pressing a button involves
16-
clicking on it). Having both methods allows to keep the code more readable.
16+
clicking on it). Having both methods allows the code to be more readable.
1717

1818
.. _interacting-with-forms:
1919

2020
Interacting with Forms
2121
----------------------
2222

23-
The ``NodeElement`` class has a set of methods allowing to interact with
23+
The ``NodeElement`` class has a set of methods allowing interaction with
2424
forms:
2525

2626
``NodeElement::getValue``
@@ -67,7 +67,7 @@ forms:
6767
Interacting with the Mouse
6868
--------------------------
6969

70-
The ``NodeElement`` class offers a set of methods allowing to interact with
70+
The ``NodeElement`` class offers a set of methods allowing interaction with
7171
the mouse:
7272

7373
``NodeElement::click``
@@ -109,8 +109,8 @@ Mink supports drag'n'drop of one element onto another:
109109
Shortcut Methods
110110
----------------
111111

112-
The ``TraversableElement`` class provides a few shortcut methods allowing
113-
to find a child element on the page and perform an action on it immediately:
112+
The ``TraversableElement`` class provides a few shortcut methods that allow
113+
finding a child element on the page and performing an action on it immediately:
114114

115115
``TraversableElement::clickLink``
116116
Looks for a link (see findLink) and clicks on it.
@@ -131,9 +131,9 @@ to find a child element on the page and perform an action on it immediately:
131131
Looks for a select or radio group (see findField) and selects a choice in it.
132132

133133
``TraversableElement::attachFileToField``
134-
Looks for a file field (see findField) and attach a file to it.
134+
Looks for a file field (see findField) and attaches a file to it.
135135

136136
.. note::
137137

138-
All these shortcut methods are throwing an ``ElementNotFoundException``
139-
in case the child element cannot be found.
138+
All these shortcut methods throw an ``ElementNotFoundException``
139+
if the child element cannot be found.

guides/managing-sessions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ one single container object:
4343
4444
.. note::
4545

46-
Mink will even lazy-start your sessions when needed (on first ``getSession()``
46+
Mink will even lazy-start your sessions when needed (on the first ``getSession()``
4747
call). So, the browser will not be started until you really need it!
4848

4949
Or you could even omit the session name in default cases:

guides/manipulating-pages.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,18 @@ The ``Element`` class provides access to the content of elements.
6060
.. note::
6161

6262
``getText()`` will strip tags and unprinted characters out of the response,
63-
including newlines. So it'll basically return the text, that user sees
63+
including newlines. So it'll basically return the text that the user sees
6464
on the page.
6565

6666
Checking Element Visibility
6767
---------------------------
6868

69-
The ``NodeElement::isVisible`` methods allows to checks whether the element
70-
is visible.
69+
The ``NodeElement::isVisible`` method checks whether the element is visible.
7170

7271
Accessing Form State
7372
--------------------
7473

75-
The ``NodeElement`` class allows to access the state of form elements:
74+
The ``NodeElement`` class allows access to the state of form elements:
7675

7776
``NodeElement::getValue``
7877
Gets the value of the element. See :ref:`interacting-with-forms`.
@@ -86,8 +85,8 @@ The ``NodeElement`` class allows to access the state of form elements:
8685
Shortcut methods
8786
~~~~~~~~~~~~~~~~
8887

89-
The ``TraversableElement`` class provides a few shortcut methods allowing
90-
to find a child element in the page and checks the state of it immediately:
88+
The ``TraversableElement`` class provides a few shortcut methods that allow
89+
finding a child element in the page and checking the state of it immediately:
9190

9291
``TraversableElement::hasCheckedField``
9392
Looks for a checkbox (see findField) and checks whether it is checked.

guides/session.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The method can also be used to reset a previous authentication:
139139
.. note::
140140

141141
Automatic HTTP authentication is only supported in headless drivers.
142-
Because HTTP authentication in browser requires manual user action, that
142+
Because HTTP authentication in the browser requires manual user action, that
143143
can't be done remotely for browser controllers.
144144

145145
Javascript Evaluation

guides/traversing-pages.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ on top of ``find()`` to make it easier to achieve many common use cases:
6161

6262
.. note::
6363

64-
These shortcuts are returning a single element. If you need to find all
64+
These shortcuts return a single element. If you need to find all
6565
matches, you will need to use ``findAll`` with the :ref:`named selector <named-selector>`.
6666

6767
Nested Traversing
6868
~~~~~~~~~~~~~~~~~
6969

7070
Every ``find*()`` method will return a ``Behat\Mink\Element\NodeElement`` instance
7171
and ``findAll()`` will return an array of such instances. The fun part is
72-
that you can make same old traversing on such elements as well:
72+
that you can use the same methods of traversing on such elements as well:
7373

7474
.. code-block:: php
7575
@@ -116,7 +116,7 @@ on the page:
116116

117117
This selector searches for an element inside the current node (which
118118
is ``<html>`` for the page object). This means that trying to pass it
119-
the XPath of and element retrieved with ``ElementInterface::getXpath``
119+
the XPath of an element retrieved with ``ElementInterface::getXpath``
120120
will not work (this query includes the query for the root node). To check
121121
whether an element object still exists on the browser page, use ``ElementInterface::isValid``
122122
instead.
@@ -128,7 +128,7 @@ Named Selectors
128128

129129
Named selectors provide a set of reusable queries for common needs. For conditions
130130
based on the content of elements, the named selector will try to find an
131-
exact match first. It will then fallback to partial matching in case there
131+
exact match first. It will then fallback to partial matching if there
132132
is no result for the exact match. The ``named_exact`` selector type can be
133133
used to force using only exact matching. The ``named_partial`` selector type
134134
can be used to apply partial matching without preferring exact matches.

index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Welcome to the Mink documentation!
22
==================================
33

4-
One of the most important parts in the web is a browser. Browser is the window
4+
One of the most important parts in the web is a browser. A browser is the window
55
through which web users interact with web applications and other users. Users
66
are always talking with web applications through browsers.
77

88
So, in order to test that our web application behaves correctly, we need
99
a way to simulate this interaction between the browser and the web application
10-
in our tests. We need a **Mink**.
10+
in our tests. We need **Mink**.
1111

1212
Mink is an open source browser controller/emulator for web applications, written
1313
in PHP 5.3.
@@ -34,8 +34,8 @@ The recommended way to install Mink with all its dependencies is through
3434
In this case you must use the different call
3535
``php composer.phar`` everywhere instead of the simple command ``composer``.
3636

37-
Everything will be installed inside ``vendor`` folder.
38-
Finally, include Composer autoloading script to your project:
37+
Everything will be installed inside the ``vendor`` folder.
38+
Finally, include the Composer autoloading script to your project:
3939

4040
.. code-block:: php
4141
@@ -55,9 +55,9 @@ Finally, include Composer autoloading script to your project:
5555
- SahiDriver - ``behat/mink-sahi-driver``
5656
- WUnitDriver - ``behat/mink-wunit-driver``
5757

58-
If you're newcomer or just don't know what to choose, you should probably
58+
If you're a newcomer or just don't know what to choose, you should probably
5959
start with the GoutteDriver and the Selenium2Driver (you will be able
60-
to tuneup it later):
60+
to tune it up later):
6161

6262
Guides
6363
------

0 commit comments

Comments
 (0)