Hi,
I've just begun to use tellurium, so please be nice with me ;-)
I 'm doing a TestNG test case with tellurium on a site that contain a
<select id="select_id"> tag with several options
I define the ui as follows :
public void defineUi() {
ui.UrlLink(uid: "lien", clocator: [tag: "a", href: "/path",
id: "link_id"])
ui.Container(uid: "form", clocator: [id:"container_id"]){
RadioButton(uid: "input0", clocator: [tag: "input", type:
"radio", value: "VALUE_1"], respond:["click"])
RadioButton(uid: "input1", clocator: [tag: "input", type:
"radio", value: "VALUE_2"], respond:["click"])
Selector(uid: "select2", clocator: [tag: "select", class:
"UNIQUE_CLASS_OF_SELECT"])
}
}
then my test is the following :
public void fillForm(){
waitForElementPresent("form.input0",50000)
click "form.input0"
println "Hello world"
waitForElementPresent("form.input1",50000)
click "form.input1"
waitForElementPresent("form.select2",50000)
def select = getUiElement("form.select2")
println select // prints org.tellurium.object.selec...@1082277
selectByValue("form.select2","VALUE_DESIRED") //throws
exception
}
The last line throws an exception :
java.lang.NullPointerException: Cannot invoke method call() on null
object
at org.codehaus.groovy.runtime.NullObject.invokeMethod
(NullObject.java:77)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod
(InvokerHelper.java:743)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod
(InvokerHelper.java:720)
at org.codehaus.groovy.runtime.callsite.NullCallSite.call
(NullCallSite.java:17)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:120)
at org.tellurium.object.Selector.selectByValue(Selector.groovy:
18)
at org.tellurium.object.Selector$selectByValue.call(Unknown
Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall
(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call
(AbstractCallSite.java:128)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callSafe
(AbstractCallSite.java:96)
at org.tellurium.dsl.BaseDslContext.selectByValue
(BaseDslContext.groovy:226)
at org.tellurium.dsl.BaseDslContext$selectByValue.callCurrent
(Unknown Source)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent
(CallSiteArray.java:47)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent
(AbstractCallSite.java:142)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent
(AbstractCallSite.java:154)
at module.TestModule.fillForm(TestModule.groovy:36)
at test.moduleTestCase.myTestSuite(Unknown Source)
Do you know what can happens ? I tried several methods, even the
direct way
(select as org.tellurium.object.Selector).selectByValue
("VALUE_DESIRED")
but this last throws a Method not found exception
I really need to understand what happens
Thanks for reading
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---