Nicolas this is the one I mentioned that wraps selenium
On Sun, Jun 25, 2017 at 4:55 PM, Nicolas Anquetil
<[email protected]> wrote:
> nope :-(
>
> but it was fun anyway
>
> nicolas
>
>
> On 25/06/2017 16:48, Max Leske wrote:
>
> Are you aware of the work that Johan did on Parasol
> (https://github.com/SeasideSt/Parasol)?
>
> Max
>
> On 25 Jun 2017, at 16:45, Nicolas Anquetil <[email protected]>
> wrote:
>
>
> Hi all,
>
> I developped a first version of a WebTestCase class.
>
> It uses SUnit and Zinc to get pages from the internet and test some
> conditions on them.
>
> The main work is actually to offer higher level search facilities inspired
> from what I saw in Selenium
>
> There is an example, that logs in and out of Github (and checks that we
> logged in and out)
>
> ---
> testLoginAndOutOfGitHub
> | node |
> self defaultUrl: 'http://github.com/'.
> self getDefaultUrl.
>
> self assert: (self searchString: 'Sign in') notNil.
> self clickLinkValue: 'Sign in'.
>
> self assert: (self searchString: 'Sign in to GitHub') notNil.
> "5 fields to inform for login
> 3 of them have values inside the login page: commit, utf8,
> authenticity_token"
> self enter: user forName: 'login'.
> self enter: pass forName: 'password'.
> self enterDefaultValueForName: 'commit'.
> self enterDefaultValueForName: 'utf8'.
> self enterDefaultValueForName: 'authenticity_token'.
> "bug in the page, there is a </form> before the real <form ...>"
> node := self searchNodeTag: 'form' afterNode: (self searchNodeTag:
> 'form').
> self submitForm: node.
>
> "similar for signout, submit a form with 2 default values"
> node := self searchFormOwning: (self searchString: 'Sign out').
> self enterDefaultValueForName: 'utf8'.
> self enterDefaultValueForName: 'authenticity_token'.
> self submitForm: node.
>
> "we are out"
> self assert: (self searchString: 'Sign in') notNil.
> ---
>
> No configOf or Catalog yet. I am too lazy
>
> can be found at:
>
> MCSmalltalkhubRepository
> owner: 'nicolasAnquetil'
> project: 'WebTest'
> user: ''
> password: ''
>
>
> nicolas
>
> --
> Nicolas Anquetil -- MCF (HDR)
> Project-Team RMod
>
>
>
>
> --
> Nicolas Anquetil -- MCF (HDR)
> Project-Team RMod