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].
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en.