Posts: 15
Threads: 9
Joined: Oct 2009
Reputation:
0
10-14-2009, 04:13 PM
In my web application,there is edit box followed by a web button.once you enter text in editbox the button will enabled.but problem is though I am passing the text,button is not enabled.I have tried using the send keys also but it did not work out?
Any idea plzzzz let me know.
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
10-14-2009, 04:17 PM
does it works manually? if yes then try sending 'Tab' key after passing the text.
Posts: 159
Threads: 0
Joined: Mar 2009
Reputation:
0
10-14-2009, 04:18 PM
Hi,
I guess in your case (estherindu) the button needs focus to get it enabled so if you try set focus after tab it should work.
Posts: 61
Threads: 1
Joined: Jul 2009
Reputation:
0
10-14-2009, 04:25 PM
Hi,
I guess the button enable process is called on either edit box's "Text_change" event or "Lost_focus" events. Try to fire those events, after entering value in edit box.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
10-14-2009, 06:00 PM
Estherindu -
QTP's interaction layer with the AUT comprising of webobjects is a chain command's of events. In your case although the naked eye sees the text entered the webedit still in its internal state cannot identify the text. So you will need to wake it up. Try this,
Code:
Browser().page().frame().webedit().Set "abc"
Browser().page().frame().webedit().Click
'..whatever code you have for clciking on button.
I am just suspecting that once the webedit identifys the text it triggers the next event of button_enable. Hope the above works..if it does not then try this as well,
Code:
Settings.Webpackage("ReplayType") = 2
Browser().page().frame().webedit().Set "abc"
Browser().page().frame().webedit().Click
Settings.Webpackage("ReplayType") =1
'..whatever code you have for clciking on button.
Does any of this helps ?
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.