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 comment:

  1. Nice Article, Please do post this kind of posts more, thanks.
    I wish you might like to have a look at my article http://javaseleniumworld.com/robot-class/

    ReplyDelete

Katalon 08: Integration of HP ALM with Katalon Studio

In this post, this post we discuss about integration of  HP ALM with Katalon Studio. If we can integrate HP ALM with Katalon we can update ...