First I'm glad you figured out whether php, java, ruby, asp it all plays in a browser as HTML. That should make your life easier. At some point go through the simple tutorials at http://www.w3schools.com/
Try this code fragment. Your trying to click an image button within a form require 'rubygems' require 'watir' sURL='http://your_test_url.htm' # Change this to your URL browser = Watir::Browser.new browser.goto(sURL) sleep 3 # The input button has a name attribute so we can use it as a handle browser.button(:name,'SDP_0_0').flash() # MAKE ME FLASH a Yellow highlight sleep 3 browser.button(:name,'SDP_0_0').click # The actual click of the button puts 'DONE' On Feb 28, 12:46 pm, Chuck van der Linden <[email protected]> wrote: > On Feb 27, 8:44 pm, Ashu <[email protected]> wrote: > > > > > > > Yes, > > as the script is running on the IP address, so a webpage opens that is > > in PHP. > > > Watir can detect the text that is written in td[2] > > xpath - /html/body/div/div/div[5]/div/div[7]/table/tbody/tr/td[2] > > But, > > There is an image file in the input below > > /html/body/div/div/div[6]/div/fieldset/table[2]/tbody/tr[3]/td[8]/ > > input > > as > > <input type="image" halign="right" valign="middle" title="Open SDP > > file" alt="Open SDP file" src="main.php_files/play-icon-big.png" > > name="SDP_0_0"> > > > So on clicking on that image file an event occurs. > > But it needs to be automated. > > Please Help. > > Thanks! > > What have you tried so far? what if any results did you get? > > you realize it's not our job to write your code for you?- Hide quoted text - > > - Show quoted text - -- 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]
