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 7929857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:13:38+00:00 2026-06-03T20:13:38+00:00

I am writing functional tests for Zend application. I run them using PHPUnit and

  • 0

I am writing functional tests for Zend application. I run them using PHPUnit and this wrapper : https://github.com/chibimagic/WebDriver-PHP

I run selenium standalone server from jar file locally (v2.19.0). I use a lot of js and ajax in this app, so I made a waitForAjax function in my FunctionalTestCase class, so I can wait until all data is loaded properly. It uses $.active, as I am using jQuery ajax functions. The function looks like that:

public function waitForAjax($timeout = 10) {
  sleep(1);
  for($i = 0 ; $i < $timeout - 1 ; $i++) {
    $active = $this->getJsResult('return $.active;');

    if($active > 0) {
      sleep(1);
    }else {
      break;
    }
  }
}

Function getJsResult executes execute_js_sync from WebDriver wrapper and gets the result from Selenium response.

My problem is as follows : selenium randomly hangs on executing js on the site. Sometimes it returns almost instantly, but most of the time it just stays on executing script. This is the only output from the server:

11:58:48.386 INFO - Executing: [execute script: return $.active;, []] at URL: /session/1334915841900/execute)

What bothers me the most is why is this happening so randomly?

I could really use some help here.

Cheers,
Maciej

  • 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-06-03T20:13:40+00:00Added an answer on June 3, 2026 at 8:13 pm

    I had when I used Selenium first too that it randomly crashes and I saw that it was eating many RAM and hitted the maxiumum RAM a application may have, maybe that is the problem I solved it by starting and killing programmatically on each request,

    Regards,

    Corné

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

Sidebar

Related Questions

I'm writing some unit test with phpUnit to test a Zend Framework application and
I'm writing a django web application, and I'm making unittests & selenium functional tests.
I'm writing functional tests (geb + spock) for a Grails application, and want to
I am writing a Zend Framework application and unit testing it with PHPUnit. In
I am writing unit and functional tests in my Ruby on Rails application. I
I started writing functional tests for my rails app today. I use the RESTful
I'm writing unit tests for a module in a small Javascript application. In order
I am writing unit tests for a multi-threading application, where I need to wait
I'm writing functional tests for a chrome app written entirely in javascript. I decided
I'm currently writing some functional tests, and I started wondering what's the best philosophy

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.