Hello.  I've been struggling with this for quite some time and I'm hoping 
someone can help out.  The answer is probably right in front of me!  I'm 
using rspec with watir-webdriver for regression tests and I want to do 
something simple like create a ticket and then lookup that same ticket in 
an isolated manner.  Is this possible and what would be the best way to go 
about it?  I can do this with a differently scoped variable, but that 
doesn't appear to be the correct way to approach this.  Thanks!

describe "Ticketing system",:template do

before(:all) do

@b = Watir::Browser.start("google.com",:chrome)

end

it 'can create a ticket' do

@b.link(:text => "Create ticket")

ticket = @b.div(:id => "ticket").text

expect(ticket).to eql(123456)

end


it 'can lookup a created ticket' do

@b.text_field(:id => "search").set(ticket)

end


after(:all) do

@b.close rescue nil

end

end


-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/1ec2fa65-8c60-4fda-aa83-5f074c0bb69a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to