I am trying to create some type of loop to reload a web page until the
value I am looking for is present. The value is a numeric string that
repesents an order id. When I print the value using puts and the value
is not present it prints 'n' I have tried using nil and n both in an
if statement but I cant seem to get it to work.  The oid variable in
my script is what I am trying to get the value of and I need to repeat
the gathering of it after using a Refresh button on the page to not
have to repeat all the navigation over again. what I would like to do
is create some kind of loop that performs the refresh and then gets
the value repeating if it is nul after a 30 second sleep but
continuing my script if a value is present, Here is the bit of code I
am using:

# goto url for portal home page as we can't click home page link
because there are 2 on the page
ie.goto "https://portal.test.wildblue.net/portal/dt?
JSPTabContainer.setSelected=HomePageChannel&last=false"
#enter first name in search
ie.text_field(:id, '_id12:firstName').set "#{$name}#{$i}"
#enter Last name in search
ie.text_field(:id, '_id12:lastName').set "Test"
#click the search button
ie.button(:value, 'Search').click
#click on the svt tab
ie.link(:text, "SVT").click
#Get the data in the provisionin Status table as an array
provisioning_status = ie.table(:class, 'cgui-group').row_values(1)
[2].to_a
#set acct_oid variable to the value in the array for the account Oid
acct_oid = (provisioning_status[8])
#convert the acct_oid variable to a string and set it to $acct_oid
$acct_oid = acct_oid.to_s
#get the value of the $acct_oid starting at the 11th character to
strip it down to just the number
#and set it to the vsariable oid
oid = ($acct_oid.from(11))
#write the oid to the screen as a validation
puts(oid)



Any assistance would be greatly appreciated

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to