*{ You can use plain selenium command using the selenium tag }* #{morphiaFixture delete:'all', load:'data.yml' /} #{selenium 'Check home page'} clearSession() // Open the home page open('/') // Check that the front post is present assertTextPresent('About the model layer') assertTextPresent('by Bob') assertTextPresent('2 comments*,*latest by Mike') assertTextPresent('domain-specific') // Check older posts assertTextPresent('The MVC application') assertTextPresent('Just a test of YABE') #{/selenium} #{selenium 'Test comments'} // Click on 'The MVC application post' clickAndWait('link=The MVC application') assertTextPresent('The MVC application') assertTextPresent('no comments') // Post a new comment type('content', 'Hello') clickAndWait('css=input[type=submit]') // Should get an error assertTextPresent('no comments') assertTextPresent('Author is required') type('author', 'Me') type('code', 'XXXX') clickAndWait('css=input[type=submit]') // Check assertTextPresent('Thanks for posting Me') assertTextPresent('1 comment') assertTextPresent('Hello') #{/selenium}