cancel
Showing results for 
Search instead for 
Did you mean: 

How to simulate ctrl alt x in a web application

SOLVED
Highlighted
Contributor

How to simulate ctrl alt x in a web application

Im trying to set .keys("~^x")

This doesnt seem to work.  Is there an alternate suggestion

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: How to simulate ctrl alt x in a web application

For the Keys method, try 

 

Keys('[Hold]~^x[Release]')  See https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-sys-deskto...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

12 REPLIES 12
Highlighted
Community Hero

Re: How to simulate ctrl alt x in a web application

Hi,

 

Have you read https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-sys-deskto... and https://support.smartbear.com/testcomplete/docs/app-objects/simulating/keystrokes.html help topics and tried what is suggested there? Doesn't it work?

Specifically, I mean [Hold] constant and .KeyDown()/.KeyUp() methods of Desktop and LLPlayer objects.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Contributor

Re: How to simulate ctrl alt x in a web application

Yes, I did. As I mentioned, I’m trying .keys(“-^x”), which is not working. Is there an alternate suggestion?
Highlighted
Community Hero

Re: How to simulate ctrl alt x in a web application

The alternate suggestion was given... using the LLPlayer or other objects, send keydown, keyup, etc., commands.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Contributor

Re: How to simulate ctrl alt x in a web application

yes, i tried that as well.  below is my code for ctrl Alt r

Sub Testing123
Call LLPlayer.KeyDown(VK_CONTROL, 2000) ' Presses Control
Call LLPlayer.KeyDown(VK_MENU, 2000) ' Presses Alt
Call LLPlayer.KeyDown(82, 2000) ' Presses r 
Call LLPlayer.KeyUp(VK_CONTROL, 1000)
Call LLPlayer.KeyUp(VK_MENU,1000)
Call LLPlayer.KeyUp(82,1000)
End Sub

Highlighted
Community Hero

Re: How to simulate ctrl alt x in a web application

So... I guess the question is... what's not working?  What behavior are you NOT seeing that you want to see? What errors, if any, are you getting?


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
Contributor

Re: How to simulate ctrl alt x in a web application

Im not getting any errors.

In my application, when i press ctrl alt x, it is supposed to bypass captcha, which is not happening

Highlighted
Community Hero

Re: How to simulate ctrl alt x in a web application

For the Keys method, try 

 

Keys('[Hold]~^x[Release]')  See https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/common-for-sys-deskto...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Highlighted
Contributor

Re: How to simulate ctrl alt x in a web application

Thank you HOLD and Release worked for multiple keys worked.

Highlighted
Community Hero

Re: How to simulate ctrl alt x in a web application


@AlexKaras wrote:

Have you read [...]

Specifically, I mean [Hold] constant [...]



@Mathit wrote:
Yes, I did.

@tristaanogre wrote:

For the Keys method, try 

Keys('[Hold]~^x[Release]')  See [the same link]


 

@Mathit wrote:

Thank you HOLD and Release worked for multiple keys worked.


Smiley LOL Smiley Wink

 

 

 

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors