Forum Discussion

odedma's avatar
odedma
Contributor
13 years ago

how can i set a wait according to a setting in a div (inner html) ?

Hi,



i have a web page that i want to wait as long as the object is visable 

the problem is that the setting that set's if the object is visable or not visable is set in the inner html (div) 

my question is how can i create a function that look's at the inner html propertie and see if the value inside is true or none ?



thanks

2 Replies

  • Hi Oded,



    You should try something like that:


    1. Retrieve the div object and store it into a variable, so you can acces to it. It doesn't matter if you use NameMapping or Find methods.


    2. Retrieve the div object property that you have to check. For example, if you have to get the class: object.className.


    3. Now you have two choices:

      1. Wait X time (for example, a minute) and check the object class again.

      2. Create a loop and check the object class every X seconds.

      In both cases, you can use the Sleep or Delay methods to delay execution the time you need.


    Let us know if it worked!
  • another peace of information 

    i tried to use WaitProperty on an ajax (see example)

    Aliases.browser.MainPage.AjaxLoading.WaitProperty "VisibleOnScreen", "True", 500000

    but it does not see any change of the value VisibleOnScreen      true or none ... 

    is there something im doing wrong ? 

    if not how can i use this function or something like it to work?



    thanks