How to keep data after headless browser selenium tests are passed? - selenium

Currently, we are using selenium for the automation test within our projects. We are using PhantomJs WebDriver to be able to run headless browser tests on bamboo. We want to be able to see the data(or content) which are created and saved by tests using PhantomJs but looks like the content will be gone after that tests are passed.
If we run the tests on Firefox driver without PhantomJs, we can see the content (or data) which is created by tests.
How we could config Phantomjs WebDriver in selenium to be able to see new content (or data) after running tests?
Any suggestion?

Related

is possible run selenium with headless browser to handle functionalities?

My objective is running automation based selenium webdriver from Jenkins, but jenkins cannot open browser when build job. so I modified my code to run in headless mode. since implementing headless browser, having some big question
is possible to handle end to end business on headless browser? cause end to end need inspect element as the process
if headless browser cannot handle, do you have some suggestion?
thanks, I'm very low to integrate automation
You don't have to change the code to run a Selenium test with Jenkins in headless mode.
You can use a Jenkins plugin of a headless X server to run your tests on an installed browser. You will even get screenshots.

Issue in selenium grid for headless testing using phantom js

I am using phantomJS for headless testing. I want to execute in 5 headless mode parallelLy. is it possible using selenium grid. I am able to execute parallely in ie, Firefox but how to execute in headless
Yes, you can run it parallel. but You need to start phantomJS with different port if you are running all phantomJS instances in the same machine. You have to register it to the hub like firefox

How can we execute single test on multiple browser using browserstack and Geb Framework

I am using Geb framework to execute the testcases on browserstack.Currently I am able to execute my test on single browser(Say Firefox) on browserstack.I need to run the same test on multiple browser
You can use the 'Gradle geb-browserstack Plugin' to run your tests on multiple browsers on BrowserStack. More details available here.
Using this plugin, the capabilities are passed as follows:
browserName_platform_browser-version
For example, to run tests on Firefox 32 on MAC, the capabilities are:
firefox_mac_32
If you have any BrowserStack related queries, you can always get in touch with them at support#browserstack.com
EDIT:
I have created a sample project here, that can help you get started with running Geb Tests in parallel on multiple browsers on BrowserStack.

Selenium IDE and Headless Browser Testing

How do I run test cases made with Selenium IDE (Firefox Plugin) in a headless browser?
When I create test cases with the firefox plugin it saves them as .html files.
I am trying to setup a way of running them in a headless browser, (using phantomJS or another tool/lib). I have seen many people mention running firefox in a hidden frame, but this is not the same as headless (ie. PhantomJS)
I have already figured out how to run selenium test cases from command line, but only in firefox or ie, I can't get it to run .html testcases on phantomjs:
java -jar selenium-server-standalone-2.39.0.jar -htmlSuite "*firefox" "http://127.0.0.1" "ts-ProjectList/TestSuite.html" "ProjectList-results.html"
I know the IDE can export test cases in different languages, but I want non-tech team members to be able to create tests using the firefox plugin.
Have you looked at http://code.tutsplus.com/tutorials/headless-functional-testing-with-selenium-and-phantomjs--net-30545?
Changing "*firefox" to phantomjs should get you started.
You'll need the phantomJS driver:
http://selenium.googlecode.com/svn/trunk/docs/api/py/webdriver_phantomjs/selenium.webdriver.phantomjs.webdriver.html

Selenium Junits on headless browser

I have recorded scripts through Selenium IDE and converted them to JUnit 4 Webdriver scripts.
Of course converted scripts had to be changed to run smoothly as Junits. Now my next goal is to make these scripts run on CI, So obviously I need some headless browser for this purpose. I found some threads, but I am looking for Junits specifically.
What could be the best solution/approach for this, any help in this regard is appreciated.
Take a look at PhantomJS. It is a headless WebKit-based browser and there is Selenium WebDriver for that called GhostDriver.
That's what i use and is OK but there is also the option of using a headed browser like Firefox or Chrome and then use Xvfb to ignore screen output.