tags:

views:

32

answers:

1

Hi,

I am testing a web app where a file is to be renamed as follows 1)first click on the files name 2) this will make a textbox appear 3) I type the new name in textbox 4) I have to click outside the textbox so that the new name gets set. or 4) Press enter key

The problem is in step 4. I've tried to get it to click at several places in my app, but the textbox doesn't loose focus and hence the name doesn't get set. I've even tried to use focus command, but, in vain.

Also tried to do this with enter key, but, seems that it doesn't work too. I tried keypress, keypressnative, etc. nothing seems to work.

Note: this sequence works when I do it manually and doesn't work when I do it from IDE or RC for C#.

Any help in this direction??

Thanks, Vamyip

+2  A: 

Selenium does not always fire the proper events. Probably your application relys on the blur event of the text box?

Try

selenium.fireEvent(locator_for_textbox, "blur");
Moritz Both
Thanks for taking time to reply. It worked exactly the way I wanted.Thanks again,Vamyip
vamyip