how to open multiple links in one browser with different tab?

2,577 views
Skip to first unread message

Sampada Dalai

unread,
Feb 13, 2014, 12:14:04 AM2/13/14
to seleniu...@googlegroups.com
example:in google chrome
www.facebook.com in another tab

thanku

Ripon Al Wasim

unread,
Feb 13, 2014, 12:24:04 AM2/13/14
to seleniu...@googlegroups.com


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d8aaccd6-593c-4446-a3d4-11223661f4da%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Biswajit Samal

unread,
Feb 15, 2014, 4:00:04 AM2/15/14
to selenium-users
Hi All,

In the given link, I can able to open multiple tabs, but what about entering links on different links. How things can be handle?

Thanks and regards,
Biswajit Samal



For more options, visit https://groups.google.com/groups/opt_out.



--
Thans and Regards
Biswajit Samal

Vikas Gahlaut

unread,
Mar 10, 2014, 5:12:06 AM3/10/14
to seleniu...@googlegroups.com
You have to get the windows ID using WindowHandles and itertor, Switch to required window and then do ur tasks

Manoj Hans

unread,
Mar 10, 2014, 2:08:02 PM3/10/14
to seleniu...@googlegroups.com
Try this--     

 driver.get("https://www.google.com");
        driver.manage().window().maximize();
        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
        Actions act=new Actions(driver);      
        act.keyDown(Keys.CONTROL).sendKeys("t").keyUp(Keys.CONTROL).build().perform(); //Open new tab
        driver.get("https://www.facebook.com"); // open facebook
        act.keyDown(Keys.CONTROL).sendKeys(Keys.TAB).keyUp(Keys.CONTROL).build().perform(); //switch back to google.com tab


--Manoj Hans


On Saturday, February 15, 2014 2:30:04 PM UTC+5:30, Biswajit Samal wrote:
Reply all
Reply to author
Forward
0 new messages