Hi All,
I am getting strange problem while running the test method. I have
five test methods in the class. One of the test method individually
run successfully but when try to run with all test method, it failed
I have following ui definition
ui.Form(uid: "userForm", clocator: [tag: "form", name: "userForm",
method: "post", action: "/btweb/faces/pages/userManagement/
createUser.jsp"]) {
InputBox(uid: "email", clocator: [tag: "input", type: "text",
name: "userForm:username", id: "userForm:username"])
InputBox(uid: "phone", clocator: [tag: "input", type: "text",
name: "userForm:telephone", id: "userForm:telephone"])
InputBox(uid: "mobilephone", clocator: [tag: "input", type:
"text", name: "userForm:mobileTelephone", id:
"userForm:mobileTelephone"])
InputBox(uid: "password", clocator: [tag: "input", type:
"password", name: "userForm:password", id: "userForm:password"])
InputBox(uid: "passwordverification", clocator: [tag: "input",
type: "password", name: "userForm:passwordVerification", id:
"userForm:passwordVerification"])
Selector(uid: "role", clocator: [tag: "select", name:
"userForm:group", id: "userForm:group"])
Selector(uid: "businessunit", clocator: [tag: "select", name:
"userForm:businessUnit", id: "userForm:businessUnit"])
TextBox(uid: "td0", clocator: [tag: "td", text:
"[email protected]"])
SubmitButton(uid: "submitbtn", clocator: [tag: "input", type:
"submit", name: "userForm:submit", id: "userForm:submit"], respond:
["click"])
}
ui.Container(uid: "rec", clocator: [tag: "table", class: "formGrid"]){
Image(uid: "img_search", clocator: [tag: "img", src: "/btweb/
ui_pics/search.gif"])
}
ui.Container(uid: "select_rec"){
UrlLink(uid: "new_org", clocator: [tag: "a", text: "select",
class: "ref", type: "submit", id:
"receiverOrganizationSearch:selectedOrg:17:testRoutingSenderSelect",
href: "#"], respond: ["click"])
}
Method :
public void addReceiverUser() {
keyType "newRoleUserForm.email", '[email protected]'
keyType "newRoleUserForm.phone", '0501234567'
keyType "newRoleUserForm.mobilephone", '0451234567'
selectByLabel "newRoleUserForm.role", 'RECEIVER'
waitForElementPresent("rec.img_search", 50000)
click "rec.img_search"
click "select_rec.new_org"
keyType "newRoleUserForm.password", 'password'
keyType "newRoleUserForm.passwordverification", 'password'
click "newRoleUserForm.submitbtn"
waitForPageToLoad 30000
}
Test Method :
@Test
public void addreceiver() {
loginModule.loginAdmin();
app.clickElement("menu.usermglink");
app.clickElement("manageusers.submit");
app.addReceiverUser();
loginModule.logOut();
loginModule.loginUser("[email protected]","password");
assertTrue(app.getTitle().contains(WELCOME_TITLE));
}
When I run it individually , it works fine but when I run with other
test method it gives following exception
com.thoughtworks.selenium.SeleniumException: ERROR: Element //
descendant-or-self::fo...@action="/btweb/faces/pages/userManagement/
createUser.jsp" and @method="post" and @name="userForm" and
@id="userForm"]/descendant-or-self::sele...@name="userForm:group" and
@id="userForm:group"] not found
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
97)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
91)
at
com.thoughtworks.selenium.DefaultSelenium.mouseOut(DefaultSelenium.java:
247)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at
groovy.lang.DelegatingMetaClass.invokeMethod(DelegatingMetaClass.java:
149)
at groovy.lang.MetaObjectProtocol$invokeMethod.call(Unknown Source)
at org.tellurium.dispatch.Dispatcher.invokeMethod(Dispatcher.groovy:
26)
at
org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:
45)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
125)
at
org.tellurium.event.EventHandler.processingEvent(EventHandler.groovy:
49)
at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
361)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:
66)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
155)
at org.tellurium.event.EventHandler
$_processEvents_closure1.doCall(EventHandler.groovy:73)
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at groovy.lang.Closure.call(Closure.java:276)
at groovy.lang.Closure.call(Closure.java:289)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:
1167)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:
1143)
at org.codehaus.groovy.runtime.dgm$108.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite
$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:
270)
at
org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:
52)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
125)
at org.tellurium.event.EventHandler.processEvents(EventHandler.groovy:
69)
at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite
$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:
266)
at
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:
51)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
163)
at org.tellurium.event.EventHandler.select(EventHandler.groovy:432)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
--
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.