Quantcast
Channel: Silk Performer
Viewing all articles
Browse latest Browse all 4084

Wiki Page: Reading and Verifying DOM Elements on a Page Using Silk Performer

$
0
0
When using Browser-Driven load testing it is important to check whether your script progressed correctly during the execution of the test. This can be achieved by using verifications. Sometimes you may be interested in listing all DOM elements, or verifying whether any of the DOM elements have a particular property value. You would normally know or expect some particular DOM elements to be on the page and do your search in a smaller subset of elements. However, this code snippet is generic and applies to all DOM elements available at the time it’s called, because we’ll be using the “//*” high-level xpath locator to inspect and verify elements. Due to the nature of performance tests, this is not recommended, so this script is intended to be a demonstration on how to read and verify properties of DOM elements and you should adapt it to your particular needs and limit its use to a small set of elements. This code can also be useful to debug application issues because it can be used to output a list of every element on a page. This sample script attached to this resolution does 3 things: -          Reads all DOM elements of a page and stores them in a list. -          Gets the text of all elements that have a text property. -          Checks whether a particular element has a property of a particular value. DOM-Elements.zip

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>