The problem is that TextBox does not have a type() method defined.
TextBox is used for Label.
You could change the TextBox type to other UI object types that have a
type() method defined,
for instance, InputBox, but you may need to overwrite the tag
attribute since InputBox uses
default tag "input".


Thanks,

-Jian



On Mon, Aug 16, 2010 at 9:48 AM, Jian Fang <[email protected]> wrote:

> Eric reported a JSF grid problem with Tellurium. I forward it here:
>
> -------------------------------------
>
> I am trying to use Tellurium with a Simple JSF Panel Grid Component(to test 
> it). I have used Tellurium with the simple JSF components like Input/Output 
> boxes Command Button and Links and all are working fine.
>
> In the attachment i have attached a code snippet of my simple JSF Grid 
> component and also the code snippet for the .groovy file and the exception 
> stack.
>
>
> *What steps will reproduce the problem?*
> 1. Paste the code snippet of Grid Component in a JSP page of small JSF 
> application
> 2. Paste the code snippet of .groovy in groovy file
> 3. run mvn test from console.
>
> *What is the expected output? What do you see instead?*
> -Tellurium test should run and "Hello" string should be typed in the cell on 
> the JSF grid and Link should be clicked on the JSF
>
> *What version of the product are you using? On what operating system?*
>
> -JSF 1.2, Windows XP, Java 6 and Tellurium 0.6.0
>
> *Please provide any additional information below.*
> -In the below attachments i am attaching the screen shot of my JSF Grid and 
> also in the .txt file i am pasting the code used to develop the JSF Grid 
> Component and the groovy code to call the test and  the exception stack i am 
> getting while doing this.
>
> Kindly help.
>
> Am i doing something wrong here?
> Do you require any other information from my side?
>
>
> Standard JSF Grid Component
>
> =======================================================================================================
> <h:form id="helloForm">
> ....
> <h:panelGrid columns="4" border="10" id="outGrid">
>  <f:facet name="header">
> <h:outputText value="Input Box Column"/>
>  </f:facet>
> <h:inputText id="textCol1"/>
> <h:outputText value="TextCol-1"/>
>  <h:commandLink id="linkCol1" value="Link-1"/>
> <h:commandButton id="buttonCol1" value="Button-1"/>
>  <f:facet name="header">
> <h:outputText value="Output Box Column"/>
>  </f:facet>
> <h:inputText id="textCol2"/>
> <h:outputText value="TextCol-2"/>
> <h:commandLink id="linkCol2" value="Link-2"/>
>  <h:commandButton id="buttonCol2" value="Button-2"/>
> <f:facet name="header">
>  <h:outputText value="Link Column"/>
> </f:facet>
> <h:inputText id="textCol3"/>
>  <h:outputText value="TextCol-3"/>
> <h:commandLink id="linkCol3" value="Link-3"/>
>  <h:commandButton id="buttonCol3" value="Button-3"/>
> <f:facet name="header">
>  <h:outputText value="Button Column"/>
> </f:facet>
>  <h:inputText id="textCol4"/>
> <h:outputText value="TextCol-4"/>
>  <h:commandLink id="linkCol4" value="Link-4"/>
> <h:commandButton id="buttonCol4" value="Button-4"/>
>  </h:panelGrid>
> </h:form>
>
>
> ------------------------------------------------------------------------------------------------------
>
> Groovy Code
>
> ======================================================================================================
>
> public class JSFKickstartModule extends DslContext {
> public void defineUi() {
>  ui.StandardTable(uid: "HelloFormoutGrid", clocator: [:]){
> TextBox(uid: "{row: all, column: 1}", clocator: [:])
>  }
> }
> public void testGrid(){
> type "HelloFormoutGrid[1][1]", "Hello"
> }
> }
>
>
> -----------------------------------------------------------------------------------------------------
> Exception Stack
> =====================================================================================================
>
>  Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 12.344 sec
> <<< FAILURE!
> testTable(test.GoogleSearchTestCase) Time elapsed: 0.265 sec <<< ERROR!
> groovy.lang.MissingMethodException: No signature of method:
> org.tellurium.object.UiObject.type() is applicable for argument types:
> (java.lang.String, org.tellurium.dsl.BaseDslContext$_type_closure8) values:
> [Hello, org.tellurium.dsl.basedslcontext$_type_closu...@42a6eb]
>  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>  at
> org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:70)
> at
> org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
>  at
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:55)
> at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:191)
>  at
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:207)
> at org.tellurium.object.UiObject.methodMissing(UiObject.groovy:135)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
> at groovy.lang.MetaClassImpl.invokeMissingMethod(MetaClassImpl.java:825)
>  at
> groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1103)
> at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1063)
>  at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:892)
> at
> org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:39)
>  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.type(BaseDslContext.groovy:259)
> at org.tellurium.dsl.BaseDslContext$type.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.JSFKickstartModule.testGrid(JSFKickstartModule.groovy:23)
>  at test.GoogleSearchTestCase.testTable(GoogleSearchTestCase.java:45)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>  at java.lang.reflect.Method.invoke(Method.java:597)
> at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
>  at
> org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
> at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
>  at
> org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
> at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
>  at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
> at
> org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
>  at
> org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
> at
> org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
>  at
> org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
> at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
>  at
> org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
> at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>  at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
>  at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
> at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
>
>
>

-- 
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.

Reply via email to