Forum Discussion

i404's avatar
i404
Contributor
13 years ago

Unable to get browser to set login button to enabled.






Hi Guys,



I have problem writing script in TestComplete to perform a login. The scenario is that login button is disabled initially, it only becomes enabled when username field and password field are filled.



In TestComplete, I did this:

  set login=bla.bla.bla.Table

  login.Username.SetText(username)

  login.Username.Keys "^[Tab]"         <----------------- i deliberately did this to see if key action will trigger the login button to be enabled "True"

  login.Password.SetText(password)

  login.Button.Click()



In my old script running QTP, we can use this script to click the login button when username & password has been typed in:

Setting.WebPackage("ReplayType") = 2,

type username

type password

Setting.WebPackage("ReplayType") = 1

click button



How can I get this done TestComplete? please help!!



Many thanks



Regards

Ian