Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
KurFreeze
Posts : 1
Join date : 2014-08-10

How to embed webdriver browser into java GUI/ attach to exsisting browser Empty How to embed webdriver browser into java GUI/ attach to exsisting browser

Sun Aug 10, 2014 2:55 am
Im new into programing and foun that selenium webrdiver is very powerful tool however I cant find way how to embed browser into my GUI and still be able to drive it.
Also every time starting code selenium creates its new browser window. But its possible that launcging my code first time it would create new browser window and for the second time I launch code it would attach to that already opened window instead of creating new ones?

English is not my native language so sorry for my mistakes.
avatar
mail2prassad
Amateur
Amateur
Posts : 41
Join date : 2013-06-05

How to embed webdriver browser into java GUI/ attach to exsisting browser Empty Re: How to embed webdriver browser into java GUI/ attach to exsisting browser

Tue Aug 12, 2014 11:01 pm
Every time you run your code, your code might be having something like
Code:
new FirefoxDriver()


This creates a new instance every time and opens a new browser window.

In order to use the same session, you may need to write your code such that the webdriver is singleton i.e one webdriver instance per JVM.
Back to top
Permissions in this forum:
You cannot reply to topics in this forum