Skip to content

hchiam/learning-selenium-ide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Learning Selenium IDE

Just one of the things I'm learning. https://github.com/hchiam/learning

Chrome extension: https://chrome.google.com/webstore/detail/selenium-ide/mooikfkahbdckldjjndioackbalphokd

API for the chrome extension: https://www.selenium.dev/selenium-ide/docs/en/api/commands

My own explorations of using Selenium IDE

Random notes

  • https://stackoverflow.com/questions/50593047/how-do-i-find-match-a-string-in-selenium-ide
  • execute script, return 'value', varName
    • you can use execute script to set a variable with a value, which other steps can use
  • you can: open, https://www/.../${varName}/subpath/
    • you can use a variable in the middle of a URL path to more dynamically navigate to URLs
  • assert element present, xpath=//pre[contains(text(),varName)]
    • you can use such a variable in xpath contains, NOTE: you cannot use regex in xpaths/selectors in Selenium IDE
    • you can get around this limitation by using assert element present and then use contains to check each non-changing part ("before", "after", "middle")
  • echo, ${varName}
    • echo works like console.log
  • assert, varName, true
    • you can even use assert to assert a variable value directly
  • execute script, if (${labelText}.match(/someRegex/)) { return true; } else { return false };, isMatch
    • or, for example: store text, jsonText, execute script, return typeof JSON.stringify(${jsonText.toString()}) == 'string', isMatch, assert isMatch true

Also see Katalon Recorder

https://github.com/hchiam/learning-katalon

About

Learning Selenium IDE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published