Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Button is not getting enabled
#1
Not Solved
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.
Reply
#2
Not Solved
does it works manually? if yes then try sending 'Tab' key after passing the text.

Reply
#3
Not Solved
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.
Reply
#4
Not Solved
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.
Reply
#5
Not Solved
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,439 02-07-2017, 12:28 AM
Last Post: sparkwanted
Rolleyes How can i check all the buttons are enabled or not using programming ? njnirmal 3 9,420 07-16-2009, 03:26 PM
Last Post: QTPian

Forum Jump:


Users browsing this thread: 1 Guest(s)