Puppetry
3.2.2
3.2.2
  • Welcome Puppetry
  • Getting Started
  • Project
  • Suite
  • Group
  • Target
    • Simple Target
    • iFrame Target
    • ShadowDOM Target
    • Chained Target
    • Shared Target
  • Test Case
  • Test Step / Action
    • Page Commands
    • Page Assertions
    • Target Commands
    • Target Assertions
  • Managing Records
  • Snippets
  • Running tests
    • Interactive Mode
    • Troubleshooting
  • Test Report
  • Export
    • Exporting as Jest Project (CI-friendly)
    • Exporting as Test Specification
  • Settings
  • Template Expressions
  • Testing Techniques
    • Testing Dynamic Content
    • Exhaustive Testing
    • Performance Testing
    • Visual Regression Testing
    • Testing Shadow DOM
    • Testing Google Analytics tracking code
    • Testing Chrome Extensions
    • Testing REST API
    • Mocking HTTP/S Requests
    • Testing Transactional Emails
      • Example with Restmail.net
      • Example with Mailinator
      • Example with IMAP bridge
      • Example with Google API
    • Testing Forms with Captcha
  • Version Control
  • Tips and Tricks
    • Embrace the Power of CSS
  • Command API
  • Test Application
Powered by GitBook
On this page
  • target.type
  • target.select
  • target.focus
  • target.click
  • target.reset
  • target.upload
  • target.tap
  • target.scroll
  • target.scrollIntoView
  • target.hover
  • target.checkBox
  • target.toggleClass
  • target.setAttribute
  • target.screenshot
  • target.waitForTarget

Was this helpful?

  1. Test Step / Action

Target Commands

PreviousPage AssertionsNextTarget Assertions

Last updated 3 years ago

Was this helpful?

target.type

Focuses the element, and then sends keyboard events for each character in the text

target.select

Sets value on select element

target.focus

Focuses the element

target.click

Emulates mouse click on the element

target.reset

Resets the input or form element

target.upload

Sets the value of a file input. Note that the target element must be INPUT of FILE type. It is also recommended to emulate click on the target (or clickable element calling the file browser) before going with this command

Since ver. 3.2.6 file path supports template expressions. So you can use e.g. environment variables to build the path.

Alternatively you can specify with in advanced options file size and name and it will be generated and attached to the file input element.

target.tap

Taps the element

target.scroll

Sets the number of pixels that an element's content is scrolled horizontally/vertically.

target.scrollIntoView

Scrolls element into view.

target.hover

Scrolls element into view if needed, and then hovers over the center of the element

target.checkBox

Toggles checkbox/radio state

target.toggleClass

Toggles the specified class value (adds or removes)

target.setAttribute

target.screenshot

Takes a screenshot of the target element.

target.waitForTarget

Waits for an element matching a provided target to appear in page.

Sets the value of an on a target

attribute
target.type
target.select
target.focus
target.click
target.reset
target.upload
target.upload advanced options
target.tap
target.scroll
target.scrollIntoView
target.hover
target.checkBox
target.toggleClass
target.setAttribute
target.screenshot
Selecting targets to highlight on the screenshot
target.waitForTarget