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

2 comments:

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

    ReplyDelete

DevOps 01: What is DevOps and How it benefits organizations?

DevOps is a culture in an organization, where the development team and operations team help each other by sharing information, process and t...