I'm interessted in the using of page/screen objects to write reusable tests.
But with google and the forums search I 't found only pages with few informations and mostly one methode which shows this pattern. At one page they was named helperbots
Has anyone a short but complete example I mean complete class of such an page/screen/ helperbot class or better an complete testplugin.
Or does you now a link, where I can find detailed information about this pattern?
On 01/10/09 4:57 PM, Michelle Davidson wrote:
> Hello,
>
> I'm interessted in the using of page/screen objects to write reusable
> tests.
> But with google and the forums search I 't found only pages with few
> informations and mostly one methode which shows this pattern. At one
> page they was named helperbots
>
> Has anyone a short but complete example I mean complete class of such an
> page/screen/ helperbot class or better an complete testplugin.
>
> Or does you now a link, where I can find detailed information about this
> pattern?
I want to take this as a basic of my own page objects, which extend this page objects.
But there were a point, which I don't unterstand. In the constructor of his classes for example ViewPageobject he want to have a SWTWorkbenchBot /SWTBot Instance. That means when I create a instance of my pageObject in the tests I must have this bot-instance. But I think, with the page pattern, all swtbot functions remain in the page objects. But in his implementation I need the bot.
Every SWTBotTest has its own bot instance which you can use to create the page objects. The reason of the page object pattern is to hide the way how you simulate the user interaction of your application (with the bot) for certain parts of your gui and not to hide the swtbot instance.