Results 1 to 4 of 4
  1. #1

    type method in webedit object

    Does WebEdit Object have the type method ? In my web application, edit boxes does not allow to enter a number if it is character only. So i am unable to do the alpha numeric validation. Can anyone give me a suggestion ?

    Thanks in advance !!


  2. #2

    Re: type method in webedit object


    Set method is there for setting value in Winedit. for ur validation set some numerical value in Webedit and script your validaton.

    Do u mean u need to type the value in runtime ???? if so no need of tool..

  3. #3

    Re: type method in webedit object

    Thanks for your quick response.

    In my web application, I have a webedit which is numeric only.When I manually try to enter a number it does not allow me to enter characters. But when i use qtp the edit box allows characters( i used "set" method here ). My requirement is just to check whether it allows characters or not.

    waiting for ur reply !!


  4. #4

    Re: type method in webedit object

    Set method is not good enough for your task.
    It sets the value to the field, but doesn't listen a keyboard. You need to send key stroke directly.

    Try that:

    hwnd = Browser("Browser").GetROProperty("hwnd")
    set wsh = CreateObject("Wscript.Shell")
    wsh.sendkeys "test"

    After that, your verification might be:
    1. Capture the error message, you are expecting after entering not numeric value.
    2. Read required WebEdit, get its value (GetROProperty("Text" ["or Value"])) and compare it with expected value:
    or testText you've entered or just verify if it IsNumeric [Look @VBscript help for exact syntax]




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:27 PM.

Copyright BetaSoft Inc.