Forum Discussion

dhundley's avatar
dhundley
Regular Contributor
18 days ago
Solved

credentials form not working

i am using version 15.71

my web application has a credentials login form that looks like this

 

manually i can enter a valid username and password, click the Sign In button and this credentials form goes away and i can start using the application. When TestComplete enters the username, password and clicks the Sign In button this credentials form disappears and then reappears immediately with the textboxes blanked out. I've tried entering the values using the Keys and SetText  methods and i've tried clicking the button both with ClickButton() and Click(-1, -1, skNoShift) but neither approach works. 

What am i missing here?

  • Does the username or password contains characters, other than alphanumeric characters i.e. @ # & () – [ { } ] : ; ', ? / * 

    I wonder if using the constant values instead, will help?

    [NumAsterisk] Num * (* on the numeric keyboard)
    [NumLock] Num Lock
    [NumMinus] Num - (- on the numeric keyboard)
    [NumPlus] Num + (+ on the numeric keyboard)
    [NumSlash] Num / (/ on the numeric keyboard)
  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Does the username or password contains characters, other than alphanumeric characters i.e. @ # & () – [ { } ] : ; ', ? / * 

    I wonder if using the constant values instead, will help?

    [NumAsterisk] Num * (* on the numeric keyboard)
    [NumLock] Num Lock
    [NumMinus] Num - (- on the numeric keyboard)
    [NumPlus] Num + (+ on the numeric keyboard)
    [NumSlash] Num / (/ on the numeric keyboard)
  • Hassan_Ballan's avatar
    Hassan_Ballan
    Regular Contributor

    Using SetText may not work and you are better off with Keys, and as rraghvani pointed out you need to pay attention to the special characters proper format.

    Also you would need to first click in the field to have focus before you perform the Keys action.

    From the log you can view each step "Picture" tab to follow the event sequence to see if anything is out of the ordinary.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Just curious, was this working before upgrading?

    A single backslash will require two backslashes due to escape sequence. The two asterisk on a keyboard generates the same character code. In a previous post Problem entering character * | SmartBear Community someone had issues using asterisk. So I'm wondering whether this is a bug in the latest version of TC!

    • dhundley's avatar
      dhundley
      Regular Contributor

      your original suggestion proved to be the solution. i replaced the asterisk character in my password string

      .....ABC*XYZ.....

      with [NumAsterisk]


      .....ABC[NumAsterisk]XYZ.....

      and the problem went away. Thank you! that would have never occurred to me.