Created
July 8, 2018 19:10
-
-
Save converge/da5e37ac0082aee4c3822c68c7fd0a98 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
body = self.browser.find_element_by_xpath('//body') | |
self.browser.execute_script( | |
"window.open('{}', '_blank')".format('http://www.osnews.com')) | |
--- | |
body = self.browser.find_element_by_xpath('//body') | |
body.send_keys(Keys.CONTROL + 't') | |
print('new tab') | |
body.send_keys(Keys.CONTROL + Keys.TAB) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment