Wednesday, December 27, 2017

How open URL in new tab using StringSelection class in Selenium?

I have come across 'StringSelection' some how and came to know that it is a class that is used for copy and paste operations on Unicode text strings. Using this class we can copy the string to system clipboard. 'StringSelection' class is available in 'java.awt.datatransfer' package.

Using Robot class from Selenium WebDriver and StringSelection class we could able to open the URL in the new tab. Please check the code below

Hope you are able to understand it, please comment for queries. Thanks for reading!!
#HappyLearning #SeleniumBabu


  1. Nice Article, Please do post this kind of posts more, thanks.
    I wish you might like to have a look at my article

  2. In the event that your website has a score more than 8, at that point there are instruments, for example, Open Webpage Voyager where upon a tick, you will have the option to see the subtleties.tor hidden url list


Selenium4: Working with two parallel windows in Selenium Automation

A new method newWindow() is introduced in Selenium 4 (Alpha). Using this method we can open a new tab or new window from the current window...