Last active
June 24, 2016 13:46
-
-
Save citypaul/0c9be1487679ca54767aad609e1c8a91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.Then(/^The share tools links should link to the first item in the promo collection$/, function (callback) { | |
var page, | |
facebook, | |
twitter; | |
this.browser.pause(1500) | |
.click('.gs-c-share-tools button') | |
.pause(1500) | |
.click('.gs-c-share-tools__button-icon--facebook') | |
.getTabIds(function(err, tabIds) { | |
page = tabIds[0]; | |
facebook = tabIds[1]; | |
}) | |
.switchTab(facebook) | |
.getTitle(function(err, title) { | |
console.log('title: ', title); | |
}) | |
.getUrl() | |
//.getUrl() | |
.then(function(url) { | |
console.log('id: ', url); | |
callback(); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment