Questions tagged [simulate]

For issues relating to simulating a system, action, function, or behavior.

Simulation is an attempt to model a real-life or hypothetical situation so that it can be studied to see how the system works. By changing variables in the simulation, predictions may be made about the behaviour of the system. It is a tool to virtually investigate the behaviour of the system under study.

451 questions
13
votes
4 answers

How to hold key down with Selenium

I am using Selenium with Python and Chrome. I am trying to hold down various keys -- specifically "w, a, s, and d." I have found Selenium's action_chains.key_press action as well as the elem.send_keys method. The problem with the first method is…
Andrew K
  • 1,571
  • 1
  • 17
  • 25
13
votes
1 answer

Send keystrokes to frontmost app from sandboxed cocoa app

I need to send keystrokes to front most app from my cooca app. I already have working code for it by using CGEventCreateKeyboardEvent() and AXUIElementPostKeyboardEvent(), but it only works if app is not sandboxed. I have searched google for the…
AmitSri
  • 1,209
  • 1
  • 20
  • 48
13
votes
2 answers

Cocoa: Simulate Macbook upper keys & Multimedia keys

I am trying to simulate the upper Macbook keys to any active app using CGEventCreateKeyboardEvent (NULL, (CGKeyCode)keycode, true); CGEventCreateKeyboardEvent (NULL, (CGKeyCode)keycode, false); So far I found and sent the first 4 key's events…
Rodrigo
  • 674
  • 8
  • 19
11
votes
4 answers

Simulate Key Press at hardware level - Windows

I'm looking for a language or library to allow me to simulate key strokes at the maximum level possible, without physically pressing the key. (My specific measure of the level of the keystroke is whether or not it will produce the same output as a…
Anti Earth
  • 4,671
  • 13
  • 52
  • 83
9
votes
3 answers

Simulate click on GMail div button with JS

I want to simulate click on GMail COMPOSE button using JS without JQuery. Here is button:
COMPOSE
Here is my js: var element =…
Mikolaytis
  • 921
  • 1
  • 12
  • 27
9
votes
3 answers

How do you simulate typing using jQuery?

Like how the click() can be used to trigger a click event on an element, is there any way to simulate the typing of a string?
user149135
9
votes
5 answers

Programmatic button click throws 'System.StackOverflowException' exception

I have written a WinForms program in C#.Net to click a button programmatically within a password form. Form1 loads and shows Form2 as a dialogue box. The application will close if DialogResult is anything other that DialogResult.OK. So far I have a…
Crazyd22
  • 783
  • 5
  • 10
  • 24
9
votes
4 answers

Is it possible to simulate closures in PHP 5.2.x not using globals?

Is it possible to simulate closures in PHP 5.2.x not using globals? I could think of a way that would pass the desired variables as extra parameters to the closure but that just doesn't feel like best practice. Any ideas?
aefxx
  • 24,835
  • 6
  • 45
  • 55
9
votes
2 answers

JavaScript : Simulate Key Events into Textbox/Input

Despite many article on SO on how to simulate key presses (keydown/keypress) in JS, no one solution seems to be working with the browsers I'm using (Firefox ESR 17.0.7, Chrome 28.0.1500.72, IE 10). The solutions I have tested were taken from here,…
lexasss
  • 302
  • 1
  • 2
  • 9
9
votes
2 answers

Can I simulate text selection with the mouse in JavaScript?

I would like to select text on the page by simulating a left mouse button down and drag it to a specified x,y location (in pixels) Can this be done with JavaScript?
thedp
  • 8,350
  • 16
  • 53
  • 95
8
votes
2 answers

Matlab/CUDA: ocean wave simulation

I've studied "Simulating Ocean Water" article by Jerry Tessendorf and tried to program the Statistical Wave Model but I didn't get correct result and I don't understand why. In my program I tried only to create a wave height field at time t = 0…
Eugene Kolesnikov
  • 643
  • 2
  • 6
  • 15
8
votes
5 answers

How to simulate fisheye lens effect by openCV?

I am looking for ways to create fisheye lens effect, looked at documentations for openCV, it looks like it contains Camera Calibration functions for radial distortions like fisheye. Is it possible to simulate fisheye distortion by openCV? If it is…
0pcl
  • 1,154
  • 4
  • 17
  • 22
8
votes
3 answers

How to: simulate an (IPP) printer

I'd like to test out some features that IPP should have (namely, monitoring the number of impressions made; see this question) but I haven't got the hardware yet. How can I simulate such a printer? Is there code for a dummy IPP printer? I'll be…
Yuval
  • 3,207
  • 32
  • 45
7
votes
2 answers

How to mock a complex REST call from the server side?

While working with javascript that uses REST services extensively -- including using vocabs like GET, PUT, POST, DELETES, etc; I have found it hard to mock the server side so front end development can go on independently (of back end). It is also…
Hon Chong Chang
  • 119
  • 1
  • 5
7
votes
0 answers

Simulate location from iOS app without Xcode

Is this possible? I want to simulate the locations given to other apps on the device.I know you can run Simulate location with Xcode with a GPX track file, but I want to see if it can be done without Xcode. Any pointers would be appreciated. I see…
user3570727
  • 10,163
  • 5
  • 18
  • 24
1
2
3
30 31