Hello Jian,

I am still struggling to get this below mentioned Grid Problem right.
I was involved in some other tasks for some days and was away from Tellurium
till today, today i started the POC again but with no success.

Tellurium as a testing framework, is very suitable for our application.
The only problem is we have lot of girds in our application and we are
facing the dynamic grid problem.

I request you to please get back to me if you are not getting the exact
problem, if possible for you we can have a WebEx too.

Request your response soon.

Thanks,
-Eric.


On Tue, Aug 24, 2010 at 6:48 PM, Jian Fang <[email protected]> wrote:

> The partial match String "*" should be at the beginning of the string,
> i.e., not "helloForm:textCol*" and should be "*helloForm:textCol".
>
> If you only have one tbody tag, the tbody section can be omitted and you
> don't really need the partial matching since the Table is accessed by row
> and column. I would suggest you try the following UI module
>
>
>         ui.StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",
> id: "helloForm:outGrid"]){
>             InputBox(uid: "{row: all, column: 1}", clocator: [type:
> "text"])
>         }
>
> Thanks,
>
> Jian
>
> On Tue, Aug 24, 2010 at 1:15 AM, Eric Gokavi <[email protected]> wrote:
>
>> Hello,
>>
>> As you had suggested i used the getHTMLSource() method on my grid.
>> I am just posting the results, unfortunately my solution is still not
>> working.. :(
>> The problem i posted in the last post still persists.
>>
>> My JSF Grid code is :
>> ------------------------------------
>>
>> <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"/>
>>         </h:panelGrid>
>> </h:form>
>>
>> My .groovy file code is
>> ---------------------------------
>>
>>  public void defineUi() {
>>         ui.StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",
>> id: "helloForm:outGrid"]){
>>             InputBox(uid: "{tbody: 1, row: all, column: 1}", clocator:
>> [name:"helloForm:textCol*"])
>>         }
>>     }
>>
>>   public void testLink(){
>>       pause 3000
>>       getHTMLSource("HelloFormoutGrid");
>>       type "HelloFormoutGrid[1][1][1]", "Hello there"
>>   }
>>
>> The output of the getHTMLSource() method called above is
>>
>> ----------------------------------------------------------------------------------------
>>
>> HelloFormoutGrid:
>> <table id="helloForm:outGrid" border="10">
>>     <tbody>
>>         <tr>
>>             <td><input id="helloForm:textCol1" name="helloForm:textCol1"
>> type="text"></td>
>>             <td>TextCol-1</td>
>>             <td><a href="#"
>> onclick="document.forms['helloForm']['helloForm:_idcl'].value='helloForm:_id2';document.forms['helloForm'].submit();
>> return false;">Go for another page.</a></td>
>>             <td><input id="helloForm:buttonCol1"
>> name="helloForm:buttonCol1" value="Button-1" type="submit"></td>
>>         </tr>
>>     </tbody>
>> </table>
>>
>> HelloFormoutGrid[1][1][1]:
>> <td><input id="helloForm:textCol1" name="helloForm:textCol1"
>> type="text"></td>
>>
>> HelloFormoutGrid[1][1][2]:
>> <td>TextCol-1</td>
>>
>> HelloFormoutGrid[1][1][3]:
>> <td><a href="#"
>> onclick="document.forms['helloForm']['helloForm:_idcl'].value='helloForm:_id2';
>> document.forms['helloForm'].submit(); return false;">Go for another
>> page.</a></td>
>>
>> HelloFormoutGrid[1][1][4]:
>> <td><input id="helloForm:buttonCol1" name="helloForm:buttonCol1"
>> value="Button-1" type="submit"></td>
>>
>>
>>
>> Can you suggest what is going wrong here now by looking a the
>> getHTMLSource method output?
>>
>> Please reply, waiting for your response.
>>
>> Thanks,
>> -Eric.
>>
>>
>>
>> On Thu, Aug 19, 2010 at 6:58 PM, Jian Fang <[email protected]>wrote:
>>
>>> Eric,
>>>
>>> I suspect there are some problems with your UI module, for the first UI
>>> module, you need to use
>>> UDL to define it since StandardTable uses UI template.
>>>
>>>
>>> ui.Form(uid: "HelloForm", clocator: [tag: "form", method: "post", id:
>>> "helloForm"]){
>>>       StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",
>>> id: "helloForm:outGrid"]){
>>>                  InputBox(uid: "HelloFormtextCol1", clocator:[id:
>>> "helloForm:textCol1"])
>>>        }
>>> }
>>>
>>> For instance, you could use
>>>
>>>
>>> ui.Form(uid: "HelloForm", clocator: [tag: "form", method: "post",
>>> id:"helloForm"]){
>>>       StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",id:
>>> "helloForm:outGrid"]){
>>>                  InputBox(uid: "{row: 1, column: 1} as
>>> HelloFormtextCol1", clocator:[id:"helloForm:textCol1"])
>>>        }
>>> }
>>>
>>> Be aware you should not use the same ID attribute for multiple elements.
>>>
>>> Thus, for your second UI module, you could define it as
>>>
>>>
>>>
>>> ui.Form(uid: "HelloForm", clocator: [tag: "form", method: "post",
>>> id:"helloForm"]){
>>>       StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",id:
>>> "helloForm:outGrid"]){
>>>                  InputBox(uid: "{row: all, column: 1}", clocator: [:])
>>>        }
>>> }
>>>
>>> Or use partial match (
>>> http://code.google.com/p/aost/wiki/UserGuide070AppendixB#How_to_do_Attribute_Partial_Matching_in_Tellurium)
>>> for the id attribute
>>>
>>>
>>> ui.Form(uid: "HelloForm", clocator: [tag: "form", method: "post",
>>> id:"helloForm"]){
>>>       StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",id:
>>> "helloForm:outGrid"]){
>>>                  InputBox(uid: "{row: all, column: 1}", clocator: [id:"*
>>> ^*helloForm:textCol"])
>>>        }
>>> }
>>>
>>> I need to see the runtime html source so that I can figure out what the
>>> correct UI module works for you.
>>> (Sorry, Trump does not support UI module yet).
>>>
>>> You could get the runtime html source using DOM inspector or by calling
>>> the following method in Telllurium:
>>>
>>> getHTMLSource("HelloForm");
>>>
>>>
>>> http://code.google.com/p/aost/wiki/UserGuide070TelluriumAPIs#getHTMLSource
>>>
>>> The tellurium-website reference project included data grids, for example,
>>> the issue search result.
>>> But we do appreciate if some users could provide their examples to help
>>> Eric. Telluirum cannot really grow without
>>> a good community support.
>>>
>>> Thanks in advance,
>>>
>>> Jian
>>>
>>>
>>> On Thu, Aug 19, 2010 at 6:10 AM, Eric Gokavi <[email protected]>wrote:
>>>
>>>> Hello,
>>>>
>>>> I had posted a project regarding a JSF Grid not working few days back.
>>>> Now the progress is i am able to test everything except :(,
>>>>
>>>> Taking the example by code.
>>>> This is my small Grid Code(This is JSF Grid):
>>>> =======================
>>>> <h:form id="helloForm">
>>>>   <h:panelGrid columns="1" border="10" id="outGrid">
>>>>           <h:inputText id="textCol1"/>
>>>>           <h:inputText id="textCol2"/>
>>>>           <h:inputText id="textCol3"/>
>>>>           <h:inputText id="textCol4"/>
>>>>   </h:panelGrid>
>>>> </h:form>
>>>>
>>>> Now i generate a .groovy code using the TrUMP utility by clicking on
>>>> the Grid and the 1st Text box.
>>>>
>>>> Scenario : 1
>>>> =========
>>>> The code is:
>>>>
>>>> ui.Form(uid: "HelloForm", clocator: [tag: "form", method: "post", id:
>>>> "helloForm"]){
>>>>       StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",
>>>> id: "helloForm:outGrid"]){
>>>>                  InputBox(uid: "HelloFormtextCol1", clocator:[id:
>>>> "helloForm:textCol1"])
>>>>        }
>>>> }
>>>>
>>>> i write a method in groovy file
>>>>
>>>> public void sayHello(){
>>>>            pause 3000
>>>>            type "HelloForm.HelloFormoutGrid.HelloFormtextCol1", "One"
>>>> }
>>>>
>>>> i run the mvn test
>>>>
>>>> What happen is:
>>>> ============
>>>> 1. Tellurium tests runs
>>>> 2. New Browser opens
>>>> 3. "One" value gets typed in the first column of grid.
>>>> 4. Test passes.
>>>>
>>>> Scenario : 2
>>>> =========
>>>>
>>>> ui.Form(uid: "HelloForm", clocator: [tag: "form", method: "post", id:
>>>> "helloForm"]){
>>>>       StandardTable(uid: "HelloFormoutGrid", clocator: [tag: "table",
>>>> id: "helloForm:outGrid"]){
>>>>                  InputBox(uid: "{row: all, column: 1}", clocator:[id:
>>>> "helloForm:textCol1"])
>>>>        }
>>>> }
>>>>
>>>> ------------------------------------------------------------------------------------------------------------------------------------------------
>>>> NOTE: This time the INPUT BOX UID is changed from "HelloFormtextCol1"
>>>> to "{row: all, column: 1}"
>>>>
>>>> -------------------------------------------------------------------------------------------------------------------------------------------------
>>>>
>>>> i write a method in groovy file
>>>>
>>>> public void sayHello(){
>>>>            pause 3000
>>>>            type "HelloForm.HelloFormoutGrid.[1][1]", "One"
>>>> }
>>>>
>>>> i run the mvn test
>>>>
>>>> What happen is:
>>>> ============
>>>> 1. Tellurium tests runs
>>>> 2. New Browser opens
>>>> 3. Test passes.
>>>>
>>>> NOTE : "One" value DOSE NOT get typed in the first column of grid
>>>> although the test passes.
>>>>
>>>> When i use the code
>>>>
>>>> public void sayHello(){
>>>>        pause 3000
>>>>        type  "HelloForm.HelloFormoutGrid[1][1]", "test"
>>>>        def x = getValue("HelloForm.HelloFormoutGrid[1][1]")
>>>>        println " Getting Value from Inbox Row One :: - "+x
>>>>        assertEquals("test", x)
>>>>        println " :: TEST PASSED :: - "
>>>> }
>>>>
>>>> output on console is :
>>>>
>>>> Getting Value from Inbox Row One :: - One
>>>> :: TEST PASSED :: -
>>>>
>>>> This means the value is getting set in the grid component and when we
>>>> call getValue method is comes back too.
>>>>
>>>> The only problem is i cannot see this in the browser (Firefox).
>>>> The other problem is the links and buttons are not getting clicked
>>>> this way so the flow dose not go to other pages i am doing this in
>>>> local env and none of the links are from outside env or domain. So the
>>>> timeout, proxies are not a problem
>>>>
>>>> Then again when i refer the direct id ( eg: click
>>>> HelloForm.HelloFormoutGrid.HelloFormLink1") all the links and buttons
>>>> work fine, when i give dynamic reference (eg:
>>>> HelloForm.HelloFormoutGrid[1][2] , second column is link column in
>>>> grid) it does not work .
>>>>
>>>> Is the functionality tested by any one of the uses, if yes kindly let
>>>> me know whats going wrong with me?
>>>> If any one can give me a small code snippet of grid component
>>>> and .groovy it will be gr8.
>>>>
>>>> Thanks in advance,
>>>> -Eric.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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]>
>>>> .
>>>> 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]<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]<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]<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.

Reply via email to