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

Lunar Lander can't identify START button to have Selenium click on it. Isn't identifiable in Chrome dev tools #18524

Open
breezin320 opened this issue Nov 8, 2024 · 4 comments
Labels
question Further information is requested

Comments

@breezin320
Copy link

Working to get Lunar Lander (old Flash game) working in Ruffle. It works fine manually, but I need to automate pressing the "Start" button using Selenium. Chrome Dev tools can't identify the Start button. It simply reports as part of the "body" element. If I right click on it manually, the Ruffle popup menu appears. Image of Start screen uploaded.
Image

I've also tried using Selenium to scan the page and report Button ID's, but that didn't work.

Any suggestions as to how to identify the Start button, use some key combination, or other approach to push it? Totally stumped
thanks for your help!!
dave

@kjarosh
Copy link
Member

kjarosh commented Nov 8, 2024

Hello 👋

Ruffle does not produce interactive HTML, instead it draws the content on a canvas and provides interactive elements (e.g. buttons) in its own way. The only solution you can employ is to click the button based on its x,y coordinates on the canvas.

You can see how Ruffle does it by picking the element in Dev Tools—press Ctrl+Shift+C and select the Flash content on the page. You'll see a shadow root (Ruffle player) and a canvas inside which draws the content.

@breezin320
Copy link
Author

Thanks for the quick and helpful response!!!! Much appreciated....

will go down this road....onward!
thanks again
dave

@n0samu
Copy link
Member

n0samu commented Nov 8, 2024

Another option is to use JPEXS Decompiler to create a modified version of the game that automatically starts. That would probably involve copying whatever code runs when the button is pressed and inserting that code elsewhere in the game. I've done modifications like this before and they usually took me a few hours of work.

@n0samu n0samu added the question Further information is requested label Nov 8, 2024
@breezin320
Copy link
Author

Thanks for the suggestion! Sounds like a bit more surgery than I'm capable of doing. I did take a look at JPEXS, and will see if I can go down that road....

dave

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

No branches or pull requests

3 participants