Hi, Tellurium did not do anything special for Alerts or popup windows. You can use the same way as in Selenium to handle alerts. Here are some articles on alerts for Selenium:
http://stackoverflow.com/questions/99045/handling-browser-pop-up-windows-with-selenium http://www.cloudtesting.com/blog/2009/07/17/processing-pop-up-alerts-and-confirmations-with-selenium-and-cloud-testing/ BTW, shouldn't you call waitForPopup instead of waitForPageToLoad if you want to display a confirmation popup window? Thanks, Jian On Tue, Aug 3, 2010 at 8:35 AM, mitta sneha <[email protected]> wrote: > > Hi All, > I am using the below code to generate alerts on the webpage... > > *groovy code:* > > class MyUiModule extends DslContext{ > > public void defineUi() { > ui.Container(uid: "Body", clocator: [tag: "body"]){ > InputBox(uid: "One", clocator: [tag: "input", direct: > "true", type: "text", id: "one"]) > InputBox(uid: "Two", clocator: [tag: "input", direct: > "true", type: "button", id: "two", value: "Click"], respond: ["click"]) > InputBox(uid: "ShowConfirm", clocator: [tag: "input", > direct: "true", type: "button", value: "Show confirm box "], respond: > ["click"]) > } > } > > public void confirm(String keyword) > { > keyType "Body.One", keyword > click ("Body.Two"); > waitForPageToLoad 30000; > > } > > > > * and the test case as below:* > > import org.openqa.selenium.internal.seleniumemulation.WaitForPageToLoad; > import org.tellurium.test.java.TelluriumJavaTestCase; > > import org.junit.*; > > > public class tellualertstestcase extends TelluriumJavaTestCase { > private static tellualerts mum; > boolean alert; > @BeforeClass > public static void initUi() { > mum = new tellualerts(); > mum.defineUi(); > > } > > @Test > > > public void check() > { > System.out.println("connecting to selenium server"); > connectUrl("http://172.17.5.192/shashidhar/alerts.html"); > try { > Thread.sleep(3000); > } catch (InterruptedException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > System.out.println("calling alert function"); > mum.checkAlert(); > //System.out.println("calling after alert function"); > > } > > } > > > > but failed to get or generate the alert on the desired web-page , > > Can u kindly send a sample code to verify or check the alerts on a > web-page. > > Thanks in advance.. > > -- > Regards, > Sneha > > -- > 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]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > -- 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.
