Jelajahi Sumber

Add additional information for starting up

[skip ci]
Daniel Gempesaw 9 tahun lalu
induk
melakukan
9fc160d9ef
1 mengubah file dengan 25 tambahan dan 7 penghapusan
  1. 25 7
      README.md

+ 25 - 7
README.md

@@ -29,19 +29,33 @@ You can use this module to directly start the webdriver servers, after
 [downloading the appropriate ones][dl] and putting the servers in your
 `$PATH`. This method does not require the JRE/JDK to be installed, nor
 does it require the standalone server jar, despite the name of the
-module.
+module. In this case, you'll want to use the appropriate class for
+driver construction: either [Selenium::Chrome][],
+[Selenium::Firefox][], [Selenium::PhantomJS][], or
+[Selenium::InternetExplorer][].
 
 You can also use this module with the `selenium-standalone-server.jar`
 to let it handle browser start up for you, and also manage Remote
 connections where the server jar is not running on the same machine as
-your test script is executing.
-
+your test script is executing. The main class for this method is
+[Selenium::Remote::Driver][].
+
+Regardless of which method you use to construct your browser object,
+all of the classes use the functions listed in the S::R::Driver POD
+documentation, so interacting with the browser, the page, and its
+elements would be the same.
+
+[Selenium::Firefox]: https://metacpan.org/pod/Selenium::Firefox
+[Selenium::Chrome]: https://metacpan.org/pod/Selenium::Chrome
+[Selenium::PhantomJS]: https://metacpan.org/pod/Selenium::PhantomJS
+[Selenium::InternetExplorer]: https://metacpan.org/pod/Selenium::InternetExplorer
+[Selenium::Remote::Driver]: https://metacpan.org/pod/Selenium::Remote::Driver
 [dl]: #no-standalone-server
 
 ### no standalone server
 
 - _Firefox 48 & newer_: install the Firefox browser, download
-  [geckodriver][gd] and put it in your `$PATH`. If the Firefox browser
+  [geckodriver][gd] and [put it in your `$PATH`][fxpath]. If the Firefox browser
   binary is not in the default place for your OS and we cannot locate
   it via `which`, you may have to specify the binary location during
   startup.
@@ -52,10 +66,11 @@ your test script is executing.
   location during startup.
 
 - _Chrome_: install the Chrome browser, [download Chromedriver][dcd]
-  and get `chromedriver` in your `$PATH`
+  and get `chromedriver` in your `$PATH`.
 
 - _PhantomJS_: install the PhantomJS binary and get `phantomjs` in
-  your `$PATH`
+  your `$PATH`. The driver for PhantomJS, Ghostdriver, is bundled with
+  PhantomJS.
 
 When the browser(s) are installed and you have the appropriate binary
 in your path, you should be able to do the following:
@@ -82,6 +97,7 @@ my $chrome = Selenium::Chrome->new(binary => '~/Downloads/chromedriver');
 See the pod for the different modules for more details.
 
 [dcd]: https://sites.google.com/a/chromium.org/chromedriver/downloads
+[fxpath]: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver#Add_executable_to_system_path
 [gd]: https://github.com/mozilla/geckodriver/releases
 
 ### with a standalone server
@@ -90,7 +106,9 @@ Download the [standalone server][] and have it running on port 4444:
 
     $ java -jar selenium-server-standalone-X.XX.X.jar
 
-Then the following should start up Firefox for you:
+As before, have the browsers themselves installed on your machine, and
+download the appropriate binary server, passing its location to the
+server jar during startup.
 
 [standalone server]: http://selenium-release.storage.googleapis.com/index.html