Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm not sure of the etiquette of answering your own question... but having experimented in a trial-and-error way, here's how I've managed to get Selenium working with PHP/Firefox3 on Ubuntu.</p> <ol> <li>I downloaded RC and copied the php client directory to /usr/share/php as 'Selenium'</li> <li>I navigated to the Selenium Server directory in the download, and started selenium with <code>java -jar selenium-server.jar</code></li> <li>I created a new Firefox profile (by running firefox -ProfileManager). I called the new Profile 'Selenium'</li> <li>Within that profile, I editing the Firefox Network preferences to proxy all protocols via localhost port 4444.</li> <li><p>I created my php script and ran it with this command:</p> <p><code>php -d include_path=".:/usr/share/php:/usr/share/php/Selenium/PEAR" test.php</code></p></li> </ol> <p>I've listed my (basic, non-PHPUnit, non-OO) first test script below for reference.</p> <pre><code>require_once 'Testing/Selenium.php'; $oSelenium = new Testing_Selenium( "*custom /usr/lib/firefox-3.0.3/firefox -P Selenium", "https://www.example.com"); $oSelenium-&gt;start(); $oSelenium-&gt;open("/"); if (!$oSelenium-&gt;isElementPresent("id=login_button")) { $oSelenium-&gt;click("logout"); $oSelenium-&gt;waitForPageToLoad(10000); if (!$oSelenium-&gt;isElementPresent("id=login_button")) { echo "Failed to log out\n\n"; exit; } } $oSelenium-&gt;type("login", "my_username"); $oSelenium-&gt;type("password", "my_password"); $oSelenium-&gt;click("login_button"); $oSelenium-&gt;waitForPageToLoad(10000); $oSelenium-&gt;click("top_nav_campaigns"); $oSelenium-&gt;stop(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload