Introducing our New Feature, Explicit Window Targeting

Explicit window targeting

We’re excited to introduce a new (and much requested!) feature to the Ghost Inspector community: Explicit Window Targeting. Now you have the power to specifically target which window or tab you want to focus on during your test steps.

Usually, when you use a CSS selector in your test, Ghost Inspector’s test runners go through all the available tabs to find the first matching element. This is done efficiently and repeatedly to strike the best balance between giving elements enough time to load but also keeping tests running as fast as possible. But sometimes you just want to hone in on a particular window or tab (or ignore all the others), and that’s where explicit window targeting comes in.

With this feature, you can simply add the “window:” string followed by a partial or full tab name or URL. Boom! Now you’re zeroed in on the exact window you want to test. It gives you more control, more flexibility, and makes your testing life a whole lot easier. If you have any questions or feedback about explicit window targeting, let us know! We’d love to hear from you.

To learn more about this feature and see some examples for regular CSS selectors or JavaScript steps, check out our documentation.