History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: WET-2
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: chitra
Reporter: Raghu Venkataramana
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
WET

Provide support for Form Submit

Created: 30/Mar/06 02:12 PM   Updated: 09/Jul/07 01:50 AM
Component/s: Native watir object model
Affects Version/s: None
Fix Version/s: 1.0.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Wet-0.5.3.4
Issue Links:
Relationship
This issue Relates to:
WET-141 There is no other way to go for searc... Minor Closed
 


 Description  « Hide
Submitting on behalf of Sathya Shankar

Some times in the websites there will be a text field and there you have to set any values and then click on the enter button in the Keyboard. This type of form options might be there for all the types of the objects. Wet should support the Forms type of all the objects and should be able to send the Enter key.


 All   Comments   Work Log   Change History      Sort Order:
Raghu Venkataramana - 20/Apr/06 01:13 PM
 This fix has to made before 1.0

Raghu Venkataramana - 10/Sep/06 04:35 AM
Description from WET-141:

Opened a web page and the wet UI.

After refreshing ,got the browser form .

Set the SEARCH text box with the item to be searched.

As there was no button and no other way to do search ,could not do search.

I cannot share resourses at this point of time.

Venugopal S Shenoy - 21/Sep/06 01:58 AM
I could achieve this, by following the below steps:

1. I installed the "AutoIt" Version 3.2.0.1. Download the exe from the site "http://www.autoitscript.com/autoit3/downloads.php", and install it on the system.

2. Include the following function in the "watirbrowser.rb" file at the location
.....\ruby\lib\ruby\gems\1.8\gems\wet-web-0.9.1.361-mswin32\qantom\webobjects\watirobjects

def send_keys(key_string)
               super(key_string)
          end

3. Include the following function in the "Browser.rb" file at the location
.....\ruby\lib\ruby\gems\1.8\gems\wet-web-0.9.1.361-mswin32\qantom\webobjects

def send_keys(key_string)
               @native_object.send_keys(key_string)
          end

4. Use the following WET Script to send the characters to the Browser

require 'WET'
include WET
ie = Browser.new()
ie.goto "http://mail.yahoo.com"
ie.send_keys("yahoo")
ie.send_keys("\t")
ie.send_keys("yahoo")
ie.send_keys("\r")

The above script will open the Yahoo Mail, input the string "yahoo" in the "Yahoo! ID" TextField. Then the "\t"(tab character) takes the focus to the "Password:" TextField. It enters the Password as "yahoo" and finally sends the "\r" i.e., the <RETURN> character to the Browser, which submits the login page.

Make the necessary changes in the files as mentioned above, to reflect in the next build.
AutoIT is a freeware, hence can this be inlcuded along with the WET installation itself ??, or
this can be mentioned in the WET Downloads page to install it separately.

Raghu Venkataramana - 18/Apr/07 04:00 PM
Fixed in Rev. 652.

Chitra,

To verify please write a cript navigate to a page on which enter can be pressed (eg. google) and do form_submit:
Ex.
b = Browser("title:=Google")
t = b.TextField("index:=1")
t.set "Wet web tester"
t.form_submit

When you run this command, a google search for 'Wet web tester' should be done automatically