Application is sorting the columns after a click on the column head i
dont have separate buttons like ascending or descending to sort

Hi am using code like this to regularise

ie.link(:href,"http://qa.irma.icat.com/inspwebapp/
displayInspections.do?
doSort=true&sortAttr=insuredName&sortDirection=~ /(ascending|
descending)/").click
ie.link(:href,"http://qa.irma.icat.com/inspwebapp/
displayInspections.do?
doSort=true&sortAttr=inspectionId&sortDirection=~ /(ascending|
descending)/").click
ie.link(:href,"http://qa.irma.icat.com/inspwebapp/
displayInspections.do?
doSort=true&sortAttr=inspectionContact&sortDirection=~ /(ascending|
descending)/").click


But am getting this error message

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :href, "http://
qa.irma.icat.com/inspwebapp/displayInspections.do?
doSort=true&sortAttr=insuredName&sortDirection=~ /(descending|
ascending)/" (Watir::Exception::UnknownObjectException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
284:in `enabled?'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
56:in `assert_enabled'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
229:in `click!'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:
215:in `click'

On Mar 19, 9:13 pm, Powerglide <bhaskar.sundar...@gmail.com> wrote:
> Hi Nagamani,
> you could do it simply by having the following code:
>
> #...@b -> Substitute @b with whatever you used for your browser instance
> #click on the ascending sort button - ??
> assert(@b.url =~ /ascending/)   -> for ascending sorting
> #click on the descending sort - >button ??
> assert(@b.url =~ /descending) -> for descending
>
> #if you want to use | so that you can validate if the url has asc or
> desc then use it like this
> assert(@b.url =~ /(descending|ascending)/ -> for descending
>
> Regards,
>
> Bhaskar
>
> On Mar 18, 4:19 am, nagmani vm <nagman...@gmail.com> wrote:
>
>
>
> > I want to use regular expression in my code i have to test the functionality
> > where a click on column head will be sorting ascending and descending vice
> > versa i.e when a click on first time the link property will be like this
> > href:http://qa.irma.icat.com/inspwebapp/displayInspections.do?doSort=true&;...
> > and
> > next time will be changing the value as 
> > href:http://qa.irma.icat.com/inspwebapp/displayInspections.do?doSort=true&;...
> > was using code 
> > ashttp://qa.irma.icat.com/inspwebapp/displayInspections.do?doSort=true&;...
> > used | operator even though not executing succeefully can anyone pls
> > let
> > me know the solution for this
>
> > On Tue, Mar 17, 2009 at 7:01 PM, JArkelen <johnvanarke...@gmail.com> wrote:
>
> > > Two questions in one post:
>
> > > 1. Is there a way to determine if a flash object has finished loading?
> > > I don't want to do anything with the flash itself, I just want to know
> > > if the page including the flash object is complety loaded before
> > > continuing.
>
> 2. I use IEthrottle to simulate a sow browser. When enabled this works
>
>
>
> > > fine when I manually open IE and go to a web page. When Watir starts
> > > IE, IEthrottle doesn't work anymore, it seems to be bypassed?
>
> > > Cheers,
> > > John
>
> > --
> > Thanks & Regards,
> >  Nagmani V.M.- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to