CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

Generating Mouse Click Events through source code. (For Automated GUI Testing)
https://forum.codesys.com/viewtopic.php?f=25&t=8930
Page 1 of 1

Author:  jking22 [ Fri Jun 22, 2018 5:02 pm ]
Post subject:  Generating Mouse Click Events through source code. (For Automated GUI Testing)

Does anyone know how to throw mouse click events in Codesys Runtime code?
e.g.
resp = SomeLib.MouseClick(300,200);

Basically the general thought would be...
1. Codesys Controller with Video Out.
2. Video to USB Capture Device...
* https://www.amazon.com/AV-io-HD-video-c ... 00ZH7HRKW/
* This one is plug and play and act's like a web-cam.
* It's really easy to write code to create an application to display the video stream and Mouse events.

3. Sikuli
* http://www.sikuli.org/
* GUI Unit testing framework that uses image recognition for object detection...
4. Write some Codesys Code receive click events (RS232, Sockets etc) or change screen commands from sikuli or applications.. process click events and return current visu information.


If you could integrate this together, you could create a pretty powerful VISU Testing framework...
e.g. something like... (Just pseudocode for sikuli or test framework)
changeScreen('Main_Visu')
assert.exists('ChangeScreen.jpg')
framework.click('ChangeScreen.jpg')
sleep_ms(2000)
Assert(current_Visu = 'NextString')


Thoughts? Anyone doing anything similar.

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/