Letractively / aost

Automatically exported from code.google.com/p/aost
Other
1 stars 0 forks source link

Creating XPath Dynamically #297

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

       I tried to get the text box name dynamically using Xpath from the
table in the url "http://code.google.com/p/aost/issues/advsearch". I used
the following code. In selenium using Java, i can dynamically get the xpath
using for loop like,

for (i=1;i<=9;i++)
{
String value =
selenium.getvalue("xpath=//table[@class='advquery']//tr[i]/td[3]/input")
}

How can i handle the same using Tellurium. I want to generate the XPath
dynamically like above case.

What version of the product are you using? On what operating system?
I am using Tellurium 0.6.0 on Windows

Original issue reported on code.google.com by gothaisu...@gmail.com on 23 Nov 2009 at 12:47

GoogleCodeExporter commented 8 years ago
Use the templates as defined by the following UI module,

ui.Form(uid: "issueAdvancedSearch", clocator: [action: "advsearch.do", method:
"post"], group: "true"){
    Table(uid: "searchTable", clocator: [class: "advquery"]){
        Selector(uid: "row:1, column: 3", clocator: [name: "can"])
        SubmitButton(uid: "row:1, column:4", clocator: [value: "Search", name: "btn"])
        InputBox(uid: "row:2, column:3", clocator:[name: "words"])
        InputBox(uid: "row:3, column:3", clocator:[name: "without"])
        InputBox(uid: "row:5, column:3", clocator:[name: "labels"])
        Table(uid: "row:6, column:1", clocator:[:]){
            UrlLink(uid: "row:1, column:1", clocator:[text: "%%More Search Tips"])
        }
        InputBox(uid: "row:6, column:3", clocator:[name: "statuses"])
        InputBox(uid: "row:7, column:2", clocator:[name: "reporters"])
        InputBox(uid: "row:8, column:2", clocator:[name: "owners"])
        InputBox(uid: "row:9, column:2", clocator:[name: "cc"])
        InputBox(uid: "row:10, column:3", clocator:[name: "commentby"])
   }
}

http://code.google.com/p/aost/wiki/AdvancedExample

Please post your questions to Tellurium user group 

http://groups.google.com/group/tellurium-users

Thanks.

Original comment by John.Jian.Fang@gmail.com on 23 Nov 2009 at 2:18

GoogleCodeExporter commented 8 years ago

Original comment by John.Jian.Fang@gmail.com on 23 Nov 2009 at 2:25