Skip to content

v1.1.8

Choose a tag to compare

@github-actions github-actions released this 09 Nov 10:38
· 18 commits to main since this release

Winwright and Winwright.InApp 1.1.8 are on nuget.org. Nothing was removed or renamed, so a suite written for 1.1.7 runs unchanged. Two changes may be noticed by an existing setup, and both are marked below.

Acts

  • A double click (WW602). A click step takes "clicks": 2. Both clicks are sent in one batch at one point. Any other count is refused when the file loads.

    { "locator": "ListItem#V1-1", "act": "click", "with": "PointerIsTheAct", "clicks": 2 }
  • A click at a point (WW603). A click step takes "at": "x,y", written the same way as a drag's points (pixels or percentages of the element). Before, the only way to reach a spot on a canvas was a drag. A point outside the element is refused with the element's size, and nothing is pressed.

    { "locator": "Pane#TimelineSurface", "act": "click", "with": "PointerIsTheAct", "at": "8.9%,6" }
  • A drag that holds a key (WW604). A drag takes "holding" set to ctrl, shift, alt or ctrl+alt. The key goes down before the press and comes up after the release. A tap of Ctrl masks Alt's release, so no menu bar opens.

    { "locator": "Pane#TimelineSurface", "act": "drag", "from": "52.9%,48", "to": "88.2%,48", "holding": "ctrl" }
  • focus (WW610). A new act puts the keyboard focus on its element through UI Automation and reads the focus back. A press after it lands on that row, not wherever the focus happened to be.

    { "locator": "#SessionList > DataItem[order=top]", "act": "focus", "reads": "focused", "expect": "focused" },
    { "locator": "#SessionList > DataItem[order=top]", "act": "press", "with": "Enter" }
  • passes: a value that must show after an act (WW608). A WPF invoke returns before the click's handler runs, so a read right after it can run too early and pass. passes names a key whose string must appear in the window after the act. The watch starts before the act, listens to UI Automation events and also polls, so it catches a string that shows only briefly. The step fails if the string was already showing before the act, and passes on a read is refused.

    { "locator": "Button#RescanButton", "act": "invoke", "passes": "context.scanning" }
  • A press of a bare digit (WW605). Before, a step like "with": "1" loaded and then failed at run time. Now the window receives that digit. Traversal keys are read only by their names.

Processes

  • launched again (WW606). After a step that claims the application exits, a process step launched again starts the application again the same way its fixture did. Files are not staged again, so the steps that follow read what the clean close kept, such as a tab, a layout or a count. A launched again with no claimed exit before it is refused when the file loads.

    { "locator": "Button#Exit", "act": "invoke" },
    { "process": "exits", "act": "read" },
    { "process": "launched again", "act": "read", "named": "the application is opened again" }
  • An act during which the application exits (WW617). If an invoke handler exits the process before UI Automation's call returns, the step used to break with a COM error. Now the act lands and its line says the application exited. The exits step after it is what checks the exit.

Locators

  • A miss names the closed menus and tabs by their state (WW601). The list now uses the state words not selected and collapsed, and it covers only the menus and tabs under the last part of the locator that matched, not every one in the window.
  • order is read by name only (WW614). (May notice.) Only top, bottom, left and right are accepted. [order=1] used to parse silently as left, and [order=9] as an order that does not exist. Both are now refused, with the four valid names.

In-app renders (Winwright.InApp)

  • A window whose background is the system backdrop (WW611). The render now draws what actually shows behind the window: the capture key, the theme's ApplicationBackgroundBrush, or the Mica base. Before, dark-theme text was drawn on white.

  • The client area at client size (WW616). Before, a render was sized to the window's frame but drew only the client area, which left a blank band along the right and bottom edges. Now it draws the client area at its own size.

    (May notice.) These two fixes change the pixels of in-app renders. A stored baseline taken from an affected window will differ once, and needs to be taken again.

Installing

<PackageReference Include="Winwright" Version="1.1.8" />
<PackageReference Include="Winwright.InApp" Version="1.1.8" />

Full Changelog: v1.1.7...v1.1.8