Hi Eric,
Are you using Tellurium new Engine or Selenium Core. Selenium Core is used
in 0.7.0 by
default. Did you see the commands passed to Selenium server? For instance,
you can run
a standalone Selenium server and the log messages will be on the console.
Please post them.
I suspect if the UI module could be located or not. If you try to call
diagnose("HelloFormoutGrid[1][4]")
what happens?
In your code, did the command getText("HelloFormoutGrid[1][4]") getback any
value. Seems for InputBox, you should use getValue().
You can try
type "HelloFormoutGrid[1][4]", "test"
def x = getValue("HelloFormoutGrid[1][4]")
assertEquals("test", x)
to see if the InputBox is updated after the type command. You could debug
your
code in an IDE.
Tellurium reference project ui-examples includes examples for different UI
types,
you may like to take a look.
I am not familiar with JSF, does it always require namespace in the UI
definition?
I am not sure if you need to add namespace as well.
Thanks,
Jian
On Tue, Aug 17, 2010 at 5:48 AM, Eric Gokavi <[email protected]> wrote:
> Hello Jian,
>
> As you had suggested me yesterday i used the InputBox, UrlLink and the
> SubmitButton for the same JSF Grid component i had mentioned
> yesterday.
> This time,
>
> I am able to complete the test cases meaning i dont get any error
> message the log stack mention below.
>
> ===================================== LOG STACK - START
> ==========================================
> Test set: test.GoogleSearchJUnitTestCase
>
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.532
> sec
> ===================================== LOG STACK - END
> ==========================================
>
> But there are no events happening on the UI meaning, when we run
> Tellurinum Test Cases it inserts the values in InputBoxs, Clicks on
> Links and Submit Buttons.
> Please take a look at my .groovy file code snippet below
>
> ===================================== .GROOVY CODE SNIPPET - START
> ==========================================
> public class MyGoogleSearchModule extends DslContext {
> public void defineUi() {
> ui.StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",
> direct: "true", id: "helloForm:outGrid"]){
> InputBox(uid: "{row: all, column: 1}", clocator: [:])
> UrlLink(uid: "{row: all, column: 3}", clocator: [:])
> SubmitButton(uid: "{row: all, column: 4}", clocator: [tag:
> "input",
> type: "submit", value: "Button-1"])
> }
> }
> public void testLink(){
> pause 3000
> println "====For Button Column ==="
> println getUiElement("HelloFormoutGrid[1][4]")
> println getText("HelloFormoutGrid[1][4]")
> click "HelloFormoutGrid[1][4]"
> pause 3000
> println "====For Link Column ==="
> println getUiElement("HelloFormoutGrid[1][3]")
> println getText("HelloFormoutGrid[1][3]")
> pause 3000
> click "HelloFormoutGrid[1][3]"
> pause 3000
> waitForPageToLoad 60000
> }
> }
> ===================================== .GROOVY CODE SNIPPET - END
> ==========================================
>
> Taking the above .groovy file code snippet's testLink() method
> Tellurium should click the Links and the Submit Buttons which are
> included in the grid and redirect the page to the next page (CODE FOR
> REDIRECTING IS IN PLACE AND WORKS WELL IN NORMAL APPLICATION).
>
> I tried with input box too and the story is same the test case passes
> but nothing happens on UI.
>
> Again the code of my grid component is passed below.
> <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 action="greeting"
> value="Go for another page."/>
> <h:commandButton id="buttonCol1"
> value="Button-1"
> action="greeting"/>
> <f:facet name="header">
> <h:outputText value="Output Box
> Column"/>
> </f:facet>
> <h:inputText id="textCol2"/>
> <h:outputText value="TextCol-2"/>
> <h:commandLink action="greeting"
> value="Go for another page."/>
> <h:commandButton id="buttonCol2"
> value="Button-2"
> action="greeting"/>
> <f:facet name="header">
> <h:outputText value="Link Column"/>
> </f:facet>
> <h:inputText id="textCol3"/>
> <h:outputText value="TextCol-3"/>
> <h:commandLink action="greeting"
> value="Go for another page."/>
> <h:commandButton id="buttonCol3"
> value="Button-3"
> action="greeting"/>
> <f:facet name="header">
> <h:outputText value="Button
> Column"/>
> </f:facet>
> <h:inputText id="textCol4"/>
> <h:outputText value="TextCol-4"/>
> <h:commandLink action="greeting"
> value="Go for another page."/>
> <h:commandButton id="buttonCol4"
> value="Button-4"
> action="greeting"/>
> </h:panelGrid>
> </h:form
> >
> Again, whats going wrong from my side? Am i doing some thing wrong?
> I just need to test a simple grid in JSF which is having 4 columns
> with InputBoxs in 1st Column, OutputBoxs in 2nd, UrlLinks in 3rd and
> SubmitButtons in 4th.
> Can you kindly provide me with a small code snippet or a small example
> for such a Grid Component if you have?
>
> Thanks
> -Eric.
>
> On Aug 16, 6:56 pm, Jian Fang <[email protected]> wrote:
> > Thanks Eric for re-posting it here. Please let us know if my suggestion
> > works for you.
> >
> > Thanks,
> >
> > Jian
> >
> > On Mon, Aug 16, 2010 at 9:51 AM, Eric Gokavi <[email protected]>
> wrote:
> > > Hello,
> >
> > > I am new to Tellurium. 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?
> >
> > > Thanks,
> > > -Eric.
> >
> > > Jian's replay is:
> > > =================
> > > Hi, 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.
> >
> > > We do appreciate if you could also post the question to Tellurium to
> > > tellurium user group to share with other users.
> >
> > > Thanks a lot,
> >
> > > -Jian
> >
> > > --
> > > 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]>
> <tellurium-users%[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.