C
curious
I need to process a web page by insert the value in a local text file
line by line each time.
for example, in the code below:
-------------------------------------------------------------------------------------------------
require 'watir'
1.upto(10) do |num|
ie = Watir::IE.start("http://www.test.php")
ie.text_fieldname, "info").set("a_line_from_C\:\\text.txt")
ie.buttonvalue, "Submit").click
end
---------------------------------------------------------------------------------------------------
I need to make the WATIR code read each line in C:\text.txt file one by
one 10 times. Could anyone tell me how I should adjust the code above
so that this WATIR code read each line in C:\text.txt file one by one
ten times, and process each time with the value in each line in the
text file??
thanks.
line by line each time.
for example, in the code below:
-------------------------------------------------------------------------------------------------
require 'watir'
1.upto(10) do |num|
ie = Watir::IE.start("http://www.test.php")
ie.text_fieldname, "info").set("a_line_from_C\:\\text.txt")
ie.buttonvalue, "Submit").click
end
---------------------------------------------------------------------------------------------------
I need to make the WATIR code read each line in C:\text.txt file one by
one 10 times. Could anyone tell me how I should adjust the code above
so that this WATIR code read each line in C:\text.txt file one by one
ten times, and process each time with the value in each line in the
text file??
thanks.