Results 1 to 4 of 4

Thread: Selenium RC Testing and waitForCondition

  1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    22
    Vote Rating
    0
      0  

    Default Selenium RC Testing and waitForCondition

    Hi,

    I try to use selenium RC to test my app.

    The big issue is that Selenium need to know when it can trigger an assertion.
    If the page in page mode no problem but in an Ajax context Selenium need to wait for all remote Ajax call are terminate to trigger new assertion (the famous waitForCondition).

    I not be able to found in the ExtJs API a Manager that can indicate to me if and remote call is in progress so :
    1 - I've missed something
    2 - The remote call can be multiple : through the form submit, the Ajax Object or the Connection object. All this call can be inspectable ?
    3 - If ExtJs don't support this feature what the best solution to add this feature in my code => maybe some javascript AOP concept

    Thanks

  2. #2
    Ext User ritesh.kapse's Avatar
    Join Date
    May 2008
    Location
    Pune, India
    Posts
    120
    Vote Rating
    0
      0  

    Exclamation Selenium IDE and Ajax request ?

    Hi all,

    I am creating a test suite in selenium. I have got a grid which takes some random time to load its data. How can I determine, if the grid has finished loading data?

    I am currently using Pause command to do so..

    Can anybody help in this...

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    118
      0  

    Default

    @ritesh.kapse: Use waitForCondition to check if the grid body (.x-grid3-body) contains rows.

    @altus34: Selenium is a visual testing tool. You probably shouldn't use it to wait for non-visual stuff. I assume that every request has a purpose (e.g. show grid rows, commit followed by closing a window etc.). Instead of waiting for the request to finish, wait for the visual response.

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    1
    Vote Rating
    0
      0  

    Default

    Is there a solution now? How can i check (with selenium respectively javascript) if ajax requests are remaining. I dont see problems in counting currently running ajax requests and providing a method "getNumberOfRunningAjaxRequests()".

    I dont want to make me thoughts about workarounds for different issues. To be exact i need the info about running ajax requests and the info if a callback method was executed after getting ajax results.

    Code:
    ###pseudocode###
    var executedCallbacks = false;
    var numberOfAjaxRequests = 0;
    
    new Ext.Ajax.request.send(url, callback) {
     //something
     numberOfAjaxRequests++; 
     executedCallbacks = false;
     //get response
     numberOfAjaxRequests--;
     //run callback(response)
     executedCallbacks = true;
    }
    So i could forget my workarounds like waiting for specified html tag value or changing css class.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •