Skip to content

Instantly share code, notes, and snippets.

@citypaul
Last active June 24, 2016 13:46
Show Gist options
  • Save citypaul/0c9be1487679ca54767aad609e1c8a91 to your computer and use it in GitHub Desktop.
Save citypaul/0c9be1487679ca54767aad609e1c8a91 to your computer and use it in GitHub Desktop.
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