#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Selenium Fundamentals

Selenese – Selenium Commands: Actions, Asserts, Accessors

What is Selenese?

Selenese is the command language used by Selenium IDE, made up of commands that fall into three categories.

Actions

Perform operations on the browser or elements — like click, type, or open — and generally cause some change of state.

Assertions

Verify that the application is in the expected state, e.g. assertTitle or assertText, causing the test to fail immediately if the condition doesn't hold.

Accessors

Read and store a value from the page (like storeTitle) for later use in the test, without asserting anything directly.

How a Selenese Command Is Structured

Every step in Selenium IDE is a row with up to three parts: the command, a target and a value. The target usually identifies an element using a locator such as id=email, css=button.submit or xpath=//a[text()='Login']. The value holds input text or a variable name.

Worked example: a login test in Selenium IDE

CommandTargetValue
open/login
typeid=emailtester@example.com
typeid=passwordSecret123
clickcss=button[type='submit']
waitForElementVisiblecss=.welcome5000
assertTextcss=.welcomeWelcome back
storeTitlepageTitle
echo${pageTitle}

Reading it top to bottom: the first four rows are actions that change the page, the wait command gives the page time to load, the assertion checks the result, and the store command saves the page title into a variable that later steps read as ${pageTitle}.

Assert vs Verify: Choosing the Right Check

Selenium IDE offers two families of checks. They test the same thing but react differently to failure:

  • assert commands (for example assertText, assertElementPresent) stop the test immediately if the check fails. Use them when later steps make no sense without this condition, such as confirming the login worked.
  • verify commands (for example verifyText, verifyTitle) record the failure but let the test continue. Use them when you want to collect several independent checks on one page, such as labels on a form.

Many commands also come in a "not" form, such as assertNotText, to confirm something is absent.

From Selenese to WebDriver Code

Selenium IDE can export recorded tests to code for languages such as Java, Python and C#. The same login check in Java WebDriver looks roughly like this:

driver.get(baseUrl + "/login");
driver.findElement(By.id("email")).sendKeys("tester@example.com");
driver.findElement(By.id("password")).sendKeys("Secret123");
driver.findElement(By.cssSelector("button[type='submit']")).click();

WebElement welcome = new WebDriverWait(driver, Duration.ofSeconds(5))
    .until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(".welcome")));
assertEquals("Welcome back", welcome.getText());

Record-and-playback is great for quick checks and for learning locators. For large suites, teams usually move to WebDriver code so they can add page objects, data-driven tests and proper reporting.

Common Selenese Mistakes

  • Using pauses instead of waits. A fixed pause slows every run and still fails on a slow day. Prefer waitFor... commands.
  • Fragile recorded locators. Recorded XPath often depends on page layout. Edit it to use a stable id or data attribute.
  • No assertions. A test that only clicks around proves very little; add checks after each important action.
  • Hard-coded test data in every row instead of storing it once in a variable.

Ready to master real-world software testing?

Learn manual and automation testing hands-on with mentor-led sessions.

Explore Course