Run Sample UI Test

Generate a new test

Let's generate a new test using the sente new command. "web-gui" should be selected as Test Type

Edit and Run Test File

  1. Open the test file with your preferred code editor.

  2. Let's develop the following test steps.

  3. Write test script

    // OPEN "https://www.npmjs.com/"
    await go('https://www.npmjs.com/');

    // SEARCH  "senteio "
    await write('//input[@type="search"]', ['senteio',keyboard.ENTER]); 
    
    // WAIT 3 seconds for search result
    await wait(3);

    // VALIDATE page
    await see('//*[contains(text(),"Sente")]')
  1. To run the test, use the command sente ./tests/sample2.js

  2. Connect to http://localhost:7901 and watch test flow.

Last updated