EventHandler - check and wait

Hello Jian,

In* EventHandler* class, there is a* **checkAndWaitForElementPresent* method
which contains a for loop to detect if the element is present in the page:

 for (int second = 0; second < timeout; second+=500) {
            try {
                if (dispatcher.isElementPresent(locator)){
                        result = true
                        break
                }
            }catch (Exception e){
            }
            Helper.pause(500)
  }

I believe we can replace the above loop with the following:
result =
dispatcher.waitForCondition("selenium.isElementPresent('${locator}')",
"60000")

Please let me know your thoughts when you have a chance.

Thanks
Iustina

_______________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does
not waive any related rights and obligations.
Any distribution, use or copying of this e-mail or the information it
contains by other than an intended recipient is unauthorized.
If you received this e-mail in error, please advise me (by return
e-mail or otherwise) immediately.

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne
renonce pas aux droits et obligations qui s'y rapportent.
Toute diffusion, utilisation ou copie de ce message ou des
renseignements qu'il contient par une personne autre que le (les)
destinataire(s) désigné(s) est interdite.
Si vous recevez ce courrier électronique par erreur, veuillez m'en
aviser immédiatement, par retour de courrier électronique ou par un
autre moyen.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to