Jian, just another thought: the concept of *waiting for an element to be present* may be encapsulated in an interface with different implementations: pure Tellurium ~as you said~, or Selenium, or another test driving engine. An interface can highlight and expose the concept more clearly...
Thanks Iustina On Jan 2, 5:24 pm, [email protected] wrote: > Lustina, > > I really like your suggestion. However, one of the main design > principles for Tellurium is to decouple the upper layers, i.e., the > layers above the dispatcher, from Selenium so that we can switch to a > different web testing driving engine. For example, Tellurium may use > our own engine instead of Selenium in the future so that it can handle > nested objects. > > Thanks, > > Jian > > On Jan 2, 9:39 am, "Iustina Vintila" <[email protected]> > wrote: > > > > > 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")- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
