Actually, since your URL links come with the title attribute, you do not
really need to use their child attribute for locating.
For example, you can try the UI module
ui.Container(uid: "mainnav", clocator:[ tag: "div",id:"mainNavigation"]){
Container(uid:"navtabs",clocator:[tag:"ul",id:"primaryNav"]){
UrlLink(uid: "browse", clocator: [title: "Browse DVDs")
UrlLink(uid: "watch", clocator: [title: "^Watch movies"]
UrlLink(uid: "queue", clocator: [title: "Your Queue"]
}
}
Be aware, if the title in the html may include extra character, then you
should use partial matching.
Thanks,
Jian
On Fri, Jul 17, 2009 at 4:06 PM, Manoj Chavan <[email protected]>wrote:
> Hi John,
> Thank u for the help... It still says element not found.
>
> Here is the HTML again
>
> <div id="mainNavigation">
> <ul id="primaryNav" class="navigation primaryNav clearfix">
> <li id="bTab" class="navItem navItem-current">
> <a href="
> http://www.mysite.com/MemberHome?lnkce=sntDd&lnkctr=mhbwse" title="Browse
> DVDs">
> <span class="w1">
> <span class="w2">Browse DVDs</span>
> </span>
> </a>
> </li>
> <li id="wnTab" class="navItem">
> <a href="http://www.mysite.com/WiHome?lnkctr=mhWN&lnkce=sntWi"
> title="Watch movies instantly on your PC">
> <span class="w1">
> <span class="w2">Watch Instantly</span>
> </span>
> </a>
> </li>
> <li id="qTab" class="navItem">
> <a href="http://www.mysite.com/Queue?lnkce=sntQu&lnkctr=mhbque"
> title="Your Queue">
> <span class="w1">
> <span class="w2">Your Queue</span>
> </span>
> </a>
> </li>
> </ul>
> </div>
>
> I modified ur module def to this
>
> ui.Container(uid: "mainnav", clocator: [tag: "div", id: "mainNavigation
> "]){
> Container(uid: "navbar", clocator: [tag: "ul", id:
> "primaryNav"]){
> Container(uid: "browse", clocator: [tag: "a", title:
> "Browse DVDs"], group: "true", respond: ["click"]){
> Span(uid: "browseDVDs", clocator: [tag: "span", text:
> "Browse DVDs"])
> }
>
> ......
>
> }
> }
>
> click "mainnav.navbar.browse" did not work....
>
> I tried this method and it seems to be working, only thing is if the order
> of the tabs changes then I have
> re-write the instruction in the test case clicking on the tested tab...
>
> ui.Container(uid: "mainnav", clocator:[ tag: "div",id:"mainNavigation"]){
> List(uid:"navtabs",clocator:[tag:"ul",id:"primaryNav"],separator:"li"){
> urlLink(uid:"all",clocator:[:]
> }
> }
>
> click "mainnav.navtabs[3]"
>
> did the trick. Now my only concern is if the order changes then what?
>
> Regards,
>
> Manoj
>
>
> *From:* Jian Fang <[email protected]>
> *To:* Manoj Chavan <[email protected]>
> *Sent:* Thursday, July 16, 2009 8:55:42 PM
> *Subject:* Re: AOST - Beginner
>
> Sorry, there was an extra "," for the Container "browser" in the last post,
> please remove it. Then, you can try
>
> click "mbrhome.navbar.browse".
>
> ui.Container(uid: "mbrhome", clocator: [tag: "body", id:
> "page-MemberHome"]){
> Container(uid: "navbar", clocator: [tag: "ul", id:
> "primaryNav"]){
> Container(uid: "browse", clocator: [tag: "a", title:
> "Browse"], group: "true", respond: ["click"]){
> Span(uid: "browseDVDs", clocator: [tag: "span", text:
> "Browse DVDs"])
> }
>
> ......
>
> }
> }
>
> On Thu, Jul 16, 2009 at 11:52 PM, Jian Fang <[email protected]>wrote:
>
>> If each sub section likes the following,
>>
>> <li>
>>
>>
>> <span class="w1">
>> <span class="w2">Browse DVDs</span>
>> </span>
>> </a>
>> </li>
>>
>> Then, you can try
>>
>> ui.Container(uid: "mbrhome", clocator: [tag: "body", id:
>> "page-MemberHome"]){
>> Container(uid: "navbar", clocator: [tag: "ul", id:
>> "primaryNav"]){
>> Container(uid: "browse", clocator: [tag: "a", title:
>> "Browse"], group: "true",, respond: ["click"]){
>> Span(uid: "browse", clocator: [tag: "span", text:
>> "Browse DVDs"])
>> }
>>
>> ......
>>
>> }
>> }
>>
>> Let me know if this works for you.
>>
>> Thanks,
>>
>> Jian
>>
>>
>> On Thu, Jul 16, 2009 at 11:20 PM, Jian Fang <[email protected]>wrote:
>>
>>> Seems some part is missing for the following section
>>>
>>> http://www.mysite.com/MemberHome?lnkce=sntDd&lnkctr=mhbwse"
>>> title="Browse">
>>>
>>> Please post it again.
>>>
>>> Thanks,
>>>
>>> Jian
>>>
>>> On Thu, Jul 16, 2009 at 6:48 PM, Manoj Chavan <[email protected]>wrote:
>>>
>>>> Hi John,
>>>> I need some pointer on creating a module for the following html.
>>>>
>>>> <ul id="primaryNav" class="navigation primaryNav clearfix">
>>>> http://www.mysite.com/MemberHome?lnkce=sntDd&lnkctr=mhbwse"
>>>> title="Browse">
>>>> <span class="w1">
>>>> <span class="w2">Browse DVDs</span>
>>>> </span>
>>>> </a>
>>>> </li>
>>>> <li id="wnTab" class="navItem">
>>>>
>>>> <span class="w1">
>>>> <span class="w2">Watch Instantly</span>
>>>> </span>
>>>> </a>
>>>> </li>
>>>> <li id="qTab" class="navItem">
>>>>
>>>> <span class="w1">
>>>> <span class="w2">Your Queue</span>
>>>> </span>
>>>> </a>
>>>> </li>
>>>> <li id="rTab" class="navItem short">
>>>>
>>>> <span class="w1">
>>>> <span class="w2">
>>>> Movies You'll
>>>> <span class="icon-love">Love</span>
>>>> </span>
>>>> </span>
>>>> </a>
>>>> </li>
>>>> </ul>
>>>>
>>>>
>>>>
>>>>
>>>> MY MODULE DEF
>>>>
>>>> ui.Container(uid: "mbrhome", clocator: [tag: "body", id:
>>>> "page-MemberHome"]){
>>>> Container(uid: "navbar", clocator: [tag: "ul", id:
>>>> "primaryNav"]){
>>>> UrlLink(uid: "browse", clocator: [tag: "a", text:
>>>> "Browse DVDs"])
>>>> UrlLink(uid: "watch", clocator: [tag: "a", text: "Watch
>>>> Instantly"])
>>>> UrlLink(uid: "queue", clocator: [tag: "a", text: "Your
>>>> Queue"])
>>>> UrlLink(uid: "mlove", clocator: [tag: "a", text:
>>>> "Recommendations"])
>>>> }
>>>> }
>>>>
>>>>
>>>> I tried this too..
>>>>
>>>> ui.Container(uid: "mbrhome", clocator: [tag: "body", id:
>>>> "page-MemberHome"]){
>>>> Container(uid: "navbar", clocator: [tag: "ul", id:
>>>> "primaryNav"]){
>>>> Span(uid: "browse", clocator: [tag: "span", text:
>>>> "Browse DVDs"])
>>>> Span(uid: "watch", clocator: [tag: "span", text: "Watch
>>>> Instantly"])
>>>> Span(uid: "queue", clocator: [tag: "span", text: "Your
>>>> Queue"])
>>>> Span(uid: "mlove", clocator: [tag: "span", text:
>>>> "Recommendations"])
>>>> }
>>>> }
>>>>
>>>> When I try to isElementPresent on 'mbrhome.navbar.queue' I get a
>>>> failure... I tried the Span() definition also and it did not work. Any help
>>>> greatly appreciated. I Know I could do a List array and click on navbar[i].
>>>> But if the order changes of the tab then that will not work.
>>>>
>>>> Thanks a lot in advance.
>>>>
>>>> Manoj
>>>>
>>>>
>>>
>>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---