Thanks for responding Roman and Super Kevy!

My code is as below

def search_emp(id)

#self.emp_id = id

@browser.send_keys [self.emp_id=id , :enter]
end

the solution here works ,but send the emp id twice and hit enters
for e.g.
if emp id = 1234
it sends 12341234 and then enters.

Regards,
Sudarshan.




On Wednesday, September 24, 2014 11:52:11 AM UTC-4, roman.g.rodriguez wrote:
>
> Hi,
>
> Supose that you are focused on a field you want to type employee id and 
> press Enter called input, you could try something like this:
>
> input = @browser.find_element(:id, "employee-id")
>
> *input.send_keys ["12345678", :enter]*
> # "12345678" is the employee id
>
> Regards
>
>
> El lunes, 22 de septiembre de 2014 09:51:06 UTC-3, Sudarshan Study 
> escribió:
>>
>>  @browser.send_keys :enter
>>
>>  : works with firefox , but is not working with chrome browser. Kindly 
>> let me know if there is any other way to perform same task. Thanks!
>>
>>

-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to