Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7490989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:48:13+00:00 2026-05-29T15:48:13+00:00

I’m really new to testing so go easy on me. I’ve got Seleneium working

  • 0

I’m really new to testing so go easy on me. I’ve got Seleneium working with Pear, PHPUnit, and Sauce Labs class SauceOnDemandTestCase.php. I can run tests and did a simple on just fine. But now I’m doing more complicated tests and keep receiving timeout messages. I’ve looked the error up on StackO and other people were getting it with IE. Now my test is using Firefox so I don’t know why that would be. The other post is here:

PHPUnit_Framework_Exception: Could not connect to the Selenium RC server when I run with Hudson

I tried changing my wait functions to waitForElement or waitForVisible but to no avail, it still fails with one error. Here is my XML log file output if that’s useful to you:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
  <testsuite name="ExampleTest" file="C:\websites\saucelabs\ExampleTest.php" tests="1" assertions="0" failures="0" errors="1" time="44.717224">
    <testsuite name="ExampleTest: Testing Selenium 1 in PHP at Sauce (FF 7)" tests="1" assertions="0" failures="0" errors="1" time="44.717224">
      <testcase name="test_example" class="ExampleTest" file="C:\websites\saucelabs\ExampleTest.php" line="23" assertions="0" time="44.717224">
        <error type="PHPUnit_Framework_Exception">ExampleTest::test_example with browser firefox 7 Windows 2003
PHPUnit_Framework_Exception: 
Response from Selenium RC server for open(/Home).
Timed out after 30000ms.

Current Browser URL: http://www.vehicleportal.co.uk/Home
Sauce Labs Job: https://saucelabs.com/jobs/8b202faaa055e213233637610fcd4448


</error>
      </testcase>
    </testsuite>
  </testsuite>
</testsuites>

My script class looks like this:

<?php

date_default_timezone_set('Europe/London');

require_once 'PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php';
require_once 'Log.php';

class ExampleTest extends PHPUnit_Extensions_SeleniumTestCase_SauceOnDemandTestCase {
    public static $browsers = array(
          array(
            'name' => 'Testing Selenium 1 in PHP at Sauce (FF 7)',
            'browser' => 'firefox',
            'os' => 'Windows 2003',
            'browserVersion' => '7',
          )
    );

    function setUp() {
        $this->setBrowserUrl('http://www.vehicleportal.co.uk');

    }

    function test_example() {
        //$this->open('/');
        //$this->assertTitle('Cross browser testing with Selenium - Sauce Labs');

        //$file = Log::factory('file', 'out.log', 'TEST');
        //$file->log("info");

        $this->open("/Home");
        $this->click("hlLogin1");
        $this->waitForVisible('h1');
        $this->type("txtLoginEmailAddress", "user@volkswagen.co.uk");
        $this->type("txtLoginPassword", "password");
        $this->click("btnLogin");
        $this->waitForVisible('h1');
        $this->verifyText("id=hlVehicleLookup", "Vehicle Lookup");
        $this->click("css=img[alt=Home]");
        $this->waitForVisible('h1');
        $this->click("link=Logout");
        $this->waitForVisible('h1');
    }
}

To give some background I have to create my script in Selenium IDE or SauceLabs builder and then convert it so the steps are taken from Selenium IDE.

I have a second smaller problem which I’d like to understand better. I keep getting:

“Notice: Undefined index: HOME in c:\php\PEAR\PHPUnit\Extensions\SeleniumTestCase\SauceOnDemandTestCase.php on line 149”

Line 149 from that file:
$yml_path = realpath($_SERVER[‘HOME’]) . ‘/.sauce/ondemand.yml’;

Class for SauceLabs: https://github.com/saucelabs/phpunit-selenium-sauceondemand/blob/master/PHPUnit/Extensions/SeleniumTestCase/SauceOnDemandTestCase.php

I could remove the reference to this but why is it there? Afterall $_SERVER[‘home’] is not PHP of the $_SERVER array.

UPDATE

We had a theory the timeout was caused by SL not using a real browser. I removed all of the verify steps completely but the timeout still occurs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T15:48:15+00:00Added an answer on May 29, 2026 at 3:48 pm

    I think this was caused by trying to run tests with a timeout which was too small. I increased the timeout and it was fine.

    All browsers were ok except the one browser. The error reported is:

    “Response from Selenium RC server for waitForPageToLoad(30000). Timed out after 30000ms”

    I couldn’t see the point in increasing the timeout period as it works for Selenium Server using the same browser version so it must be something to do with Sauce. In the end I did try increasing the time limit to 90seconds (90000) milliseconds which did the job. I have a theory that due to the extended test time when using Sauce that this must cause the script to timeout on this one browser. Anyway the solution is to increase the timeout as suggested by the error message.

    I wrote about it here:

    TestIgniter Blog Post

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.