Skip to content

Instantly share code, notes, and snippets.

@sourishkrout
Last active December 13, 2015 17:39
Show Gist options
  • Save sourishkrout/4949756 to your computer and use it in GitHub Desktop.
Save sourishkrout/4949756 to your computer and use it in GitHub Desktop.
/*global it:true */
"use strict";
var describeWd = require("./helpers/driverblock.js").describeForApp('TestApp')
, should = require('should');
describeWd('elementByTagName', function(h) {
it('should return element using the web driver api', function(done) {
h.driver.elementByTagName('button', function(err, element) {
should.exist(element.value);
done();
});
});
it('should return element but also leak uiautomation js all over the place', function(done) {
var mainWindow = 'UIATarget.localTarget().frontMostApp().mainWindow()';
h.driver.execute(mainWindow + '.buttons()[0].name();', [], function(err, result) {
result.should.equal('ComputeSumButton');
done();
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment