I've just moved from using Squish for Web to Squish for Windows to automation test a window application, and i'm having this issue. When i tried to record and playback testcases, Squish keep inspecting only the whole application window instead of inspecting specific objects. For each event (e.g. clickButton()), Squish just simply pointed to the button's location on the application window and clicked on it (area).
Here is an example testscript that Squish generated for my app:
# test.py
startApplication("\"AppX\"")
mouseClick(waitForObject(names.AppX_Window), 554, 782, MouseButton.PrimaryButton)
mouseClick(waitForObject(names.AppX_Window), 560, 828, MouseButton.PrimaryButton)
# names.py
AppX_Window = {"text": "App X", "type": "Window"}
So i decided to give a try on another window application which is Paint, and Squish worked beautifully. It inspected each specific button that i clicked and declared every single of them in names.py file. Here is an example testscript that Squish generated for Paint:
# test.py
startApplication("mspaint")
clickButton(waitForObject(names.pencil_Button))
clickButton(waitForObject(names.fill_with_color_Button))
# names.py
pencil_Button = {"text": "Pencil", "type": "Button"}
fill_with_color_Button = {"text": "Fill with color", "type": "Button"}
Is there anyway for squish to hook into specific objects on my application the same way it hooked into paint's? (I'm completely new to Squish, StackOverFlow and writing in English so if anything is inappropriate or annoyed, please be kind enough to let me know, thank you so so much!)