Topic
  • 1 reply
  • Latest Post - ‏2012-12-12T07:53:02Z by SystemAdmin
MKVL
MKVL
19 Posts

Pinned topic Wait for the next object's existence

‏2012-11-22T04:38:24Z |
Hi,

I am in need of a clarification that relates to the time delay between the selection of two test objects. The speed at which the page containing the next test object, gets loaded is unpredictable. This makes the sleep() option which we usually give, of no use. I tried to connect the next object with the current one by linking the next object with the waitforexistence() function. But the problem here is that, the next object name will vary depending on the environment and state (cold state and login state). So this reduces reusability.
So here, I would like to know, whether there is any option which will connect two test objects in the script, residing in two web pages by default, without any need to specify the object.

Thanks and Regards,
MKVL
Updated on 2012-12-12T07:53:02Z at 2012-12-12T07:53:02Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: Wait for the next object's existence

    ‏2012-12-12T07:53:02Z  
    In IE we use browser().waitForExistance() to wait for browser to load. But this does not work the same in FF.

    So you can try to use codes like:
    while(true){
      if (obj1().exists() || obj2().exists())
        break;
      sleep(1);
    
    Updated on 2014-03-25T12:57:47Z at 2014-03-25T12:57:47Z by iron-man