Sign up for the Testim Dev Kit beta. Sign up now

Javascript Methods: A Quick Way to Figure Out Methods to Use

As you may already know, Testim provides the flexibility to extend the functionalities of our platform by giving teams the…

By Testim,

As you may already know, Testim provides the flexibility to extend the functionalities of our platform by giving teams the ability to add their own JavaScript code. That being said, there maybe a situation where you need to use inbuilt javascript methods within the Testim JavaScript editor.  For Example – Say you want to find out of if an element is enabled on the page, you could do this

if(!element.disabled) {

 return true;

}

Now how do you know that, you could use the inbuilt method disabled() here?  The answer is simple.  Just follow the below steps-

  1. Open any web page on your Chrome browser
  2. Right click on an element and select “Inspect”
  3. Navigate to Console tab
  4. Start typing “$0.”
  5. Then observe all the inbuilt methods which are supported by Chrome

The same methods are supported by Testim as well.  Additionally, we support commonly used javascript methods such as reload(), split(), trim() and much more.  For more javascript examples check out our help document here.

Testim's latest articles, right in your inbox.

From our latest feature releases, to the way it impacts the businesses of our clients, follow the evolution of our product

Blog Subscribe