nightwatch
Version:
Easy to use Node.js based end-to-end testing solution for web applications using the W3C WebDriver API.
27 lines (26 loc) • 791 B
JavaScript
/**
* Inspect element in DevTools.
*
* @example
* export default {
* demoTest(browser: NightwatchAPI): void {
* const lastElement = browser.element('#nestedt').getLastElementChild().inspectInDevTools('lastChild');
* console.log('last element:', lastElement);
* },
*
* async demoTestAsync(browser: NightwatchAPI): Promise<void> {
* const lastElement = await browser.element('#nestedt').getLastElementChild().inspectInDevTools('lastChild');
* console.log('last element:', lastElement);
* }
* }
*
* @since 3.0.0
* @method inspectInDevTools
* @memberof ScopedWebElement
* @param {string} txt
* @instance
* @returns {ScopedWebElement}
*/
module.exports.command = function(txt) {
return this.runQueuedCommand('inspectInDevTools', {args: [txt]});
};