Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

Hi,
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.

rkrao

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

Hi,

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

Alex

bauer_inc

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