Automated browser based testing on ChromeOS - selenium-chromedriver

Is there a way to automate testing on ChromeOS? like selenium based test scripts for chrome browser running on a Chrome OS device ?

There are some google chrome extensions that provide similar capabilities. The first one that popped up in a Google search was this one: https://chrome.google.com/webstore/detail/ghost-inspector-web-test/aicdiabnghjnejfempeinmnphllefehc?hl=en-US

Related

Any good replacment for chrome apps?

Since chrome apps will retire this year, is there any good replacement for it? I have a webclient which runs locally inside a chrome app with support of a cardreader for login to the webserver. Since all the hardware related things are managed inside the chrome app manifest and within the chrome api it is difficult to find a good replacement for this, any idea?

Assign tray icon to Google Chrome web application

I need to create a web application which will be stored in the traybar of Windows, this to prevent users from accidentally close my application (without the need of a pre-close alert message).
I thought that Google Chrome's background apps could be the right way to go, mostly because I don't need cross-browser compatibility and I have to choose which browser my users will use to run this web application.
The only problem is that I don't understand if I can achieve what I need with this feature.
I've found only this example of background app in Chrome countdown app
But this app uses the "background page" feature, that is different from what I'm looking for.
How can I let a Chrome app be minimized in the traybar (or even in the taskbar would be ok) instead of be closed?
Try to use node-webkit (chromium + node.js) for it: https://github.com/rogerwang/node-webkit
It allow to create any web-app and it support tray icons: https://github.com/rogerwang/node-webkit/wiki/Tray
You can download my windows example app here: https://mega.co.nz/#!xQMzgbxD!S58G-V23QLNRDFC10xso41-T2V8OZQVsQEH-lr46R3s
If you want exactly chrome, try this NPAPI plugin example: http://minimizetotray.googlecode.com/files/SourceCode.zip from http://habrahabr.ru/post/73003/
Unfortunately, I don't think you will be able to achieve exactly what you're after. You might be able to combine the two solutions below to nearly achieve your requirements. However, I don't think the type of control you are after is available via Google Apps.
Google App Launcher
The Google App Launcher would fulfill the "stored in the traybar of Windows" requirement.
The Chrome App Launcher is the hub of all your Chrome apps and with it
you have quick access to all of your apps from the desktop. When you
install an app from the "For Your Desktop" collection of the Chrome
Web Store, you get the App Launcher. The App Launcher requires you to
sign in to Chrome to enable apps that need access to your Google
account.
Manage apps
When you download a new app that enables App Launcher, the apps from
your Apps bookmark on Chrome New Tab page will also appear in the App
Launcher. Managing apps in the App Launcher is simple.
Add more apps: Click the Chrome Web Store button in your apps list and explore the apps in the store.
...
Background: Extending Your App's Life
You mentioned background apps in your question but I would recommend you explore it further. It essentially provides the "prevent users from accidentally close my application" requirement that you stated. This isn't foolproof (see bold sentence below) but it is about as close to the requirement I think you will be able to achieve.
As of Google Chrome 10, the background feature lets a hosted app run
as soon as the user logs into their computer—before the user launches
Chrome or the app—and to continue running even when Chrome or the app
has no visible windows. However, if the user explicitly quits Chrome,
the browser and app both exit.

Can you still create a Chrome packaged app in the browser with manifest 2.0?

All of the examples I've seen show apps launching in their own windows. This may be great an all for chromebook/chrome os, but is there still an option to launch in a browser tab?
No, there is no way to do that. Chrome Packaged Apps are not supposed to run inside a browser. You can, however, open URLs in a browser tab using window.open. But you won't have control of that tab after you issue the command.
If you need some sort of integration/control between your Chrome Packaged App and the browser, you can create an extension and make a communication pipe between the extension and the app - as long as both are running, using the chrome.runtime.sendMessage API.
See this sample for a simple code that does exactly that (two apps and one extension exchanging messages directly, without any server component).
chrome.app.window.create will create a new Window for an App.
If you want window manipulation, you should switch to chrome.tabs API and look for an extension instead of an App.
Reference
chrome.tabs
chrome.app.window

How to use Google Chrome with Developer Tools with Selenium RC

I can open a google chrome browser like this:
selenium = new DefaultSelenium(Server, ServerPort,
"*googlechrome", DomainURL);
but it would be really useful to have it opened with the Chrome Developer Tools enabled, to be able to debug problems when developing the tests.
I can't manage to enable them, anybody knows about this?
Thanks in advance
You need to use a custom profile that have developer tools enabled. Selenium is starting Chrome with a new clean profile each and every time you use it. Selenium 1 does not offer a mechanism for overriding this. Selenium 2's ChromeDriver, however, can use an example profile.
You can try using Firefox with Firebug

Google Chrome Application Mode: Possible to isolate multiple instances?

I want to run multiple Google Chrome application windows logged into the same web site (Twitter.com, say), each with different credentials. Is this possible? If so, how?
My initial testing shows that multiple Chrome app windows are not sufficiently isolated to do this. Logging into the second account logs me into the second account in both windows, suggesting that they are sharing information just as two Chrome tabs might.
You can use a Chrome "Incognito" window for this.
As you've found, Chrome windows are (like in most browsers) just groupings for tabs, not an authentication barrier.
look for a plugin called "swap my cookies"
You can't do that with chrome Incognito windows.
Take a look here: http://code.google.com/p/chromium/issues/detail?id=24690.
So that's right you can create only two isolated session: one incognito and one normal.
See the latest post:
Although it's an extension / plug-in and not in core Chromium, MultiLogin has been working quite well for me: https://chrome.google.com/webstore/detail/nccllfnllopfpcbjdgjdlfmomnfgnnbk
It can open new tabs, each with their own cookie jar.