Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imgui UI Automation #1251

Closed
shettynitin87 opened this issue Jul 25, 2017 · 12 comments
Closed

imgui UI Automation #1251

shettynitin87 opened this issue Jul 25, 2017 · 12 comments
Labels

Comments

@shettynitin87
Copy link

shettynitin87 commented Jul 25, 2017

Hi,

  • I have created an UI for an application using imgui.
  • I need to automate and validate that UI.
  • Is there any procedure or APIs exposed by imgui to perform UI Automation?
  • Thanks in advance for your help and suggestions.
@ocornut
Copy link
Owner

ocornut commented Jul 25, 2017 via email

@shettynitin87
Copy link
Author

shettynitin87 commented Jul 26, 2017

Hi @ocornut ,

  • Thanks for your reply.
  • As a work around, I tried to use LDTP tool on the UI but it is not listing my window in the list(which is retrieved using getwindowlist()).
  • Is there any way or additional packages that I need to install to use LDTP tool to automate my UI that has been created using imgui?

@ocornut
Copy link
Owner

ocornut commented Jul 26, 2017

I don't know what is LDTP nor how to use it. If you mean Linux Desktop Testing Project I don't think that sort of project would be able to know anything about dear imgui internals, the data isn't exposed anywhere.

@shettynitin87
Copy link
Author

Thanks for the update @ocornut
Yes, I meant Linux Desktop Testing Project.

@ocornut
Copy link
Owner

ocornut commented Jul 26, 2017

Well, the answer is that it's not possible to easily automate testing on dear imgui application at the moment.
If you are interested in funding this feature you can contact me privately to discuss it, otherwise it'll have to wait until this becomes a natural priority for me (no ETA) or someone does it. This generally doesn't align very much with current dear imgui use cases, but I appreciate it'll be useful down the line.

@MrSapps
Copy link

MrSapps commented Jul 26, 2017

You won't get windows or anything from tools because of how its rendered... what you could do is something like that "ImGui remoting" project where it also renders ImGui some where else across the network?

But instead of rendering on another machine render to another app on the same machine which draws the window rects using whatever API's allow your testing framework to "see" them?

@ocornut
Copy link
Owner

ocornut commented Jul 26, 2017

I imagine a testing framework would also want to simulate interacting with the app, opening menu xx, clicking button xx, drag stuff around, which imply some support for those things in imgui.

@shettynitin87
Copy link
Author

Hi @paulsapps , thanks for your suggestion but as @ocornut mentioned we also need to interact and also validate the interactions with the UI.
Only cloning might not help us with the interaction and validation part.

@MrSapps
Copy link

MrSapps commented Jul 27, 2017

I can't find the issue where the guy posted the remoting stuff, but I recall it might have been bi-directional. Might still be worth a quick look if you can find it.

@ocornut ocornut added the dropped label Aug 1, 2017
@ocornut
Copy link
Owner

ocornut commented Aug 1, 2017

@paulsapps I think the issue is that you can't automate things like "find where is button XXX", "active menu item given name", etc. They are totally missing constructs and to seriously interact with an imgui app you'd probably need a bit of a framework to make those things natural and easy to do.
Using remoteimgui or remotepdesktop won't really help there, as I understand the problem.

@shettynitin87 Can we close this issue as agreed it is not happening at the moment, or do you have something else in mind?

@shettynitin87
Copy link
Author

sure @ocornut , will close this for now. In case if I am able to find an approach to overcome this, I will reopen and shall update on this thread accordingly.
Thanks for your help.

@ocornut ocornut closed this as completed Aug 1, 2017
@shettynitin87
Copy link
Author

Hi,

  • I have found a work around to automate my application, though a raw approach for now. It serves the purpose.
  • Kindly, refer the attached block diagram for more details.
  • Following is the detail with respect to each block in the diagram:
    1. xdotool: Refer following link for more information.
    2. Scrot(snapshot): Refer following link for more information.
    3. Image Comparison: Refer following article for comparing 2 images using python-opencv approach.
      flow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants