VineGlobal / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
1 stars 0 forks source link

How to hide browser & run operations on that hidden browser. #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system :win 7
.Net Framework version :latest
Office Version :
SeleniumWrapper version :latest

What is your issue ?

Hello,
First of all thank you very much for selenium vba.

I want to know, Is it possible to hide browser while running the test and run 
operation on that hidden browser. like clicking on a link,login in a site , 
extract text etc by not showing operations on browser to user. i want to 
completely hide the browser.

If so, Can you please show me a working example in vbs .

Thanks in advance.
Waiting for your reply.

Original issue reported on code.google.com by shan4sha...@gmail.com on 21 Jan 2014 at 8:34

GoogleCodeExporter commented 9 years ago
What you want is a headless browser. There is one included with this wrapper 
named PhantomJS :

Dim driver As New SeleniumWrapper.WebDriver
driver.start "phantomjs", "http://www.google.com/"
driver.open "/"
...
driver.quit

Unfortunately a console window is launched a the beginning and closed at the 
end of the execution. For now it's not possible to hide it, but I had a quick 
look at the Selenium project as this one is build on it and it looks like it 
will be possible in the next release.

Original comment by florentbr on 21 Jan 2014 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40

GoogleCodeExporter commented 9 years ago
Hi!

I would like to ask whether is it possible now to open a headless browser now? 
If so, then can you give me an example, please? Thank you in advance!

Original comment by viktor.s...@gmail.com on 9 Jan 2015 at 9:31

GoogleCodeExporter commented 9 years ago
Oh, and i meant in selenium without phantomJS

Original comment by viktor.s...@gmail.com on 9 Jan 2015 at 9:32

GoogleCodeExporter commented 9 years ago
PhantomJS is the only headless browser available in SeleniumVBA.
Why doesn't it fit your needs?

Original comment by florentbr on 9 Jan 2015 at 10:39