Quality Testing

Quality is delighting customers

How to open different URLs in same browser tabs using selenium webdriver?

Views: 36

Reply to This

Replies to This Discussion

Hi,

You can refre to the following code to open and close the browser tab.

Open tab
DRIVER.<any webelement so that we can confirm that current page is loaded>.send_keys(Keys.COMMAND + 't')   
example:
DRIVER.find_element_by_tag_name('body').send_keys(Keys.COMMAND + 't')    

Close tab
DRIVER.<any webelement so that we can confirm that current page is loaded>.send_keys(Keys.COMMAND + 'w')  

example:
DRIVER.find_element_by_tag_name('body').send_keys(Keys.COMMAND + 'w')  

For any further details on automated website testing please refer https://www.qasource.com/automated-testing-services

Thanks

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2017   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service