Forum Discussion

birgitKP's avatar
birgitKP
New Contributor
7 years ago

On .Click() Action Computer enteres PowerSafeMode. Why?

Hello everyone,

 

i've a problem running tests with test complete on my local pc.

I wanted to do a simple test, which only includes login and close an application.

 

It opens my application i think it although enters the username and password, but then suddenly it enters the power save mode.

I don't know why. Did someone else had this problem and can lend me a hand how i can solve this?

 

Edit: It always happens at all actions including .Click().

 

I've no screensaver on and although i use no keyboard shortcut that can cause the power save mode.

 

Thanks for your help!

7 Replies

  • SanderK's avatar
    SanderK
    Occasional Contributor

    Could the problem be that calling SetText with null as an argument causes weird behaviour? The reason I'm asking is because line 4 in your screenshot will never evaluate to true. So, if userName or userPassword are null they will never be set to the supervisor login information you defined. What you want line 4 to look like is:

     

    if(userName == null || userPassword == null){

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      SanderK wrote:

      Could the problem be that calling SetText with null as an argument causes weird behaviour? The reason I'm asking is because line 4 in your screenshot will never evaluate to true. So, if userName or userPassword are null they will never be set to the supervisor login information you defined. What you want line 4 to look like is:

       

      if(userName == null || userPassword == null){


      Good catch, SanderK

       

      More correct code would be 

       

      if ((userName == null)||(userPassword == null))

       

      That way it doesn't try to evaluating null || userPassword.

       

       

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Post a screenshot of your test steps so we can see them please.

  • birgitKP's avatar
    birgitKP
    New Contributor

    Here the screenshot of the test where this problem always pops up. There is some code commented out, because i tried yesterday several things to find the problem.

     

    I found out, that it always turns into power safe mode when performing a step with .Click(), i have no idea why. If i get over the step with tab and enter it works without any problems, but doing this is not a solution.

     

    So maybe someone had the same problem with .Click() and can lend me a hand solving this problems.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      Why is using "[Tab]" not a solution? Why do you HAVE to use Click?  If your code works, then it's performing the necessary task, correct?

       

      The only thing I can think of is that there is something intercepting mouse clicks in your application or OS that, when attempting to click on those fields is sending it into powersave mode... perhaps a security setting as it appears that you're doing login testing on some security form.  

      • birgitKP's avatar
        birgitKP
        New Contributor

        Solving it using tab is not a solution for me, because i want to simulate the large part of our users and the large part of the users uses the click instead of the tab and enter.

         

        I will speak with our admin again, maybe he has any idea what security setting could cause this problem.

         

        Anyway, thanks for your help.