cancel
Showing results for 
Search instead for 
Did you mean: 

How to simulate ctrl alt x in a web application

SOLVED
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
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
[Community Expert Group]
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
Extensions available
12 REPLIES 12
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 Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
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
[Community Expert Group]
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
Extensions available
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

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
[Community Expert Group]
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
Extensions available
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

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
[Community Expert Group]
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
Extensions available
Contributor

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

Thank you HOLD and Release worked for multiple keys worked.

Community Hero

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


@AlexKaras wrote:

Have you read [...]

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



@Madhit wrote:
Yes, I did.

@tristaanogre wrote:

For the Keys method, try 

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


 

@Madhit wrote:

Thank you HOLD and Release worked for multiple keys worked.


Smiley LOL Smiley Wink

 

 

 

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
6 / 7 API Testing Mistakes Video
Top Kudoed Authors