Not sure if you want to skip entering a text into the text field
when the value read from the spreadsheet is blank, or you
want to clear the text field.

To differentiate between those two cases save the string "nil"
into those cells when no action is required and try this:

Presuming that you have the value read from the spreadsheet's cell
stored in a variable (i.e. sTextFromCell ).

    # Replace blank values read from spreadsheet with a space
    if(sTextFromCell = "")
       sTextFromCell = " "
    end

   # Determine to skip or enter the value in the text field
    if(sTextFromCell != "nil")
      browser.text_filed(:how, what).set sTextFromCell
   end

If you are having issues reading the values from the cell in the
spreadsheet that's a different issue.

Hope that helps,
Joe

On Jun 14, 12:34 am, Chandu80 <chandu.she...@gmail.com> wrote:
> Hi All,
> I have written a script which requires me to insert a blank value into
> a textbox on webpage.
> The script should take this blank value from the  spreadsheet and then
> insert it into the textbox.(As this is a part of the negative test
> scenario)
> When I leave a column in a spreadsheet blank and try to run the
> script,

> Regards
> Chandrika

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to