On Monday, August 5, 2013 11:06:11 AM UTC-7, Chuck van der Linden wrote:
>
> On Wednesday, July 3, 2013 12:36:16 AM UTC-7, Željko Filipin wrote:
>
>> On Wed, Jul 3, 2013 at 8:08 AM, Vincy C <[email protected]> wrote:
>>
>>> Can anyone tell me the project structure for cucumber+watir project in 
>>> Net beans IDE
>>
>>
>> You can structure the project how ever you want. Read this book if you 
>> want to learn how to structure the code in a good way:
>>
>> https://leanpub.com/cucumber_and_cheese
>>
>> Željko
>> --
>> https://leanpub.com/watirbook 
>>
>
> Mine looks like this.  I'm using the Test-Factory page and data object gem 
>  (it's a bit lighter weight that Cheesey's and supports only 
> Watir-webdriver, so can be a bit more optimized for watir users, compared 
> to one that supports watir-webdriver and selenium-webdriver)
>
>
> <https://lh5.googleusercontent.com/-_86AbnEEZXU/Uf_pdIvR-NI/AAAAAAAAAEw/K3p83cTZaDw/s1600/cuke-project-layout.png>
>
> btw  in that particular example, the main reason you see two pages under 
lib, is that they are 'base' pages which contain common elements the other 
pages depend on.  Having them there makes it easier to load them first 
automatically without having to call each out by name.  That's done with 
code like this in env.rb

require 'test-factory'
World Foundry
World StringFactory
World DateFactory

#  our lib directory, where we keep page_objects, data_objects, and other 
test helper methods
$: << File.dirname(__FILE__)+'/../../lib'

#require the definitions for page and data objects
Dir["#{File.dirname(__FILE__)}/../../lib/*.rb"].each {|f| require f }
Dir["#{File.dirname(__FILE__)}/../../lib/page_objects/*.rb"].each {|f| 
require f }
Dir["#{File.dirname(__FILE__)}/../../lib/data_objects/*.rb"].each {|f| 
require f }

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to