Display results as :

Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara


How to simulate Ctrl+V in WebDriver2

View previous topic View next topic Go down

How to simulate Ctrl+V in WebDriver2

Post by rkrao on Sun Jun 16, 2013 9:23 pm

I need to check the following scenario :
1. Click on an image link which copies the url of the current page to the clipboard
2. Do a ctrl + v in the address bar of a new browser window.

- Is it possible to achieve the 2nd point using webdriver2?
- Also is it possible to bring the focus to the address bar of the browser window to paste the copied url?
 Please help.


Posts : 1
Join date : 2013-06-16

Back to top Go down

Re: How to simulate Ctrl+V in WebDriver2

Post by bauer_inc on Fri Nov 15, 2013 4:43 pm


I'm using the webdriver with java and this will work for me so:

1.  WebElement input = driver.findElement(By.xpath("//input"));
     input.sendKeys(Keys.CONTROL + "v");

2.  I think it is not possbile to locate the address bar as an WebElement.  
    Also pasting driver.get(Keys.CONTROL + "v"); was not working for me
Hope this helps



Posts : 6
Join date : 2013-11-15

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum