Forum: RSpec [ANN] rSquery 0.1.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
546405d327acc3598d5310ea6353b96a?d=identicon&s=25 Ivo Dancet (Guest)
on 2009-05-15 20:02
(Received via mailing list)
Hello all

rSquery aims to reduce the difficulties involved in writing selenium
tests in cucumber environments for webapps that use jQuery.

The project contains several methods to help you with writing
javascript commands for selenium and javascript based tests for
cucumber or even rSpec.

It makes it possible to write stuff like (in jQuery enabled webapp):

- jquery("#content").wait_for_visible
- jquery("#dialog button:contains(Ok)").click
- jquery.wait_for_text("User saved...")
- jquery.wait_for_element(".some_element")
- jquery("#dialog div").text.should have_text(/some_text/)
- jquery("#dialog").find(".warning")
- jquery("#dialog").html.should have_tag("button", "Ok")
- jquery("#dialog").should be_visible
- jquery("#dialog") # page must have an element with id 'dialog'

The project is at http://github.com/caifara/rsquery/tree/master

Ivo Dancet
by2.be
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-05-15 22:19
(Received via mailing list)
> Hello all
>
> rSquery aims to reduce the difficulties involved in writing selenium tests
> in cucumber environments for webapps that use jQuery.
>
> The project contains several methods to help you with writing javascript
> commands for selenium and javascript based tests for cucumber or even rSpec.
>

Excellent! Please add it to the related tools page in the Cucumber
wiki (in alphabetical position)

> - jquery("#dialog") # page must have an element with id 'dialog'
>

Will it work with WebDriver? Selenium as we know it seems to be EOL'ed
soon...
http://google-opensource.blogspot.com/2009/05/intr...

Aslak
546405d327acc3598d5310ea6353b96a?d=identicon&s=25 Ivo Dancet (Guest)
on 2009-05-16 18:12
(Received via mailing list)
Op 15-mei-09, om 21:47 heeft aslak hellesoy het volgende geschreven:

>>
>
> Excellent! Please add it to the related tools page in the Cucumber
> wiki (in alphabetical position)

Done that

>> - jquery("#dialog").html.should have_tag("button", "Ok")
>> - jquery("#dialog").should be_visible
>> - jquery("#dialog") # page must have an element with id 'dialog'
>>
>
> Will it work with WebDriver? Selenium as we know it seems to be
> EOL'ed soon...
> http://google-opensource.blogspot.com/2009/05/intr...

It won't work right out of the box as it uses selenium in the end. It
should however be quite easy to rewrite the two commands that access
selenium directly if WebDriver makes it possible to execute js in the
loaded document.

I did not really look into WebDriver yet, but is there a ruby api?

Ivo Dancet
by2.be
This topic is locked and can not be replied to.