Ask a Question

keypress simulator for testcomplete web

SOLVED
mortenb123
Contributor

keypress simulator for testcomplete web

I'm trying to emulate the following simple step:

 

  panel = frame.frameIpsframe.panelMain;

  passwordBox = panel.passwordboxInputpin;

  passwordBox.SetText("zzzz");

 

But the "zzzz" is in real recorded from the keypress and xored with a salt. nothing whats in the box.

 

I've tried both LLPlayer.KeyDown/KeyUp and SysDesktop.KeyDown/KeyUp

 

https://support.smartbear.com/viewarticle/75263/

https://support.smartbear.com/viewarticle/70109/

 

I like to enter "1111" pin into the webpage but nothing works, I try with mouseclick and hover to make sure things are entered at the correct place, but nothing arrives in the box

 

  passwordBox.Click(43, 13);
  passwordBox.HoverMouse(45, 13);

  LLPlayer.KeyDown(1, 2000);
  LLPlayer.KeyUp(1, 2000);
  LLPlayer.KeyDown(1, 2000);
  LLPlayer.KeyUp(1, 2000);
  LLPlayer.KeyDown(1, 2000);
  LLPlayer.KeyUp(1, 2000);
  LLPlayer.KeyDown(1, 2000);
  LLPlayer.KeyUp(1, 2000);
  //Sys.Desktop.KeyDown(1);
  //Sys.Desktop.KeyUp(1);
  //Sys.Desktop.KeyDown(1);
  //Sys.Desktop.KeyUp(1);
  //Sys.Desktop.KeyDown(1);
  //Sys.Desktop.KeyUp(1);
  //Sys.Desktop.KeyDown(1);
  //Sys.Desktop.KeyUp(1);   
  //passwordBox.SetText("1111");

 

Thanks Any ideas very appreciated.

2 REPLIES 2
UnveN
Staff

Hello, try

passwordBox.Keys("my password");

 

Stanislav
SmartBear Developer

Thanks Stanislav

Worked like a dream. Why didn't I test that.

 

cancel
Showing results for 
Search instead for 
Did you mean: