Selenium IDE test cases on Chrome - google-chrome

I used Selenium IDE for testing on Firefox but now I want to use the same test cases on other browsers like Chrome, IE9 and Safari. What can I do to do this?

To run selenium IDE generated script into another browser, you need to store all your test script under test suite.
Then you can run that test suite with selenium RC server.
java -jar selenium-server.jar -htmlSuite "insert_browser_name_here"
"insert_root_domain_here" "insert_full_path_to_suite_here"
"insert_a_full_path_to_store_reports_here"
In above command you need to pass suite location, browser name, base URL, and location for result.
For selenium support browser you can refer
http://radical-qa.blogspot.in/2012/03/selenium-supported-browsers.html

Selenium IDE is the Firefox extension. To run your tests on other browsers, you'll need another tool, Selenium WebDriver, for example.
PS I think that Webdriver actually is the next evolution step for QA automation, IDE lacks flexibility a lot

I found the same solution as above but explained in mere detail here: http://www.qafriend.com/selenium/running-selenium-script-on-internet-explorer-and-chrome

Related

How do I tell figwheel to start and connect to Google Chrome instead of Firefox?

I'm taking some baby steps with figwheel.
When I fire up the tutorial application, it starts firefox, which then connects back to the figwheel process to get code to run on its JavaScript engine. If firefox is already running, a new tab is opened and the connection proceeds likewise. Figwheel probably just executes the firefox command with appropriate options. Or maybe it is using xdg-open.
The system is a Fedora Linux with KDE. Interestingly a "default browser" is not currently configured (how to configure the default browser is described in these KDE help pages): the application to start is selected based on URL contents. So I am not sure why figwheel selects firefox instead of Google Chrome, also installed.
Now, for testing purposes I sometimes want figwheeel to use a Google Chrome process instead. Is there a way to do that?
There seems to be no option regarding this.
You can use figwheel's :launch-js option to define what action should be taken for example:
:launch-js ["chrome" "--repl" :open-url]

Selenium IDE doesn't open webpages that return a json response

I have a big Selenium test suite that's testing a web service. Given an input url, the web service returns either a regular html response or a json response. The test suite is being executed with Firefox's Selenium IDE. The tests call the open command on a given url and then verify stuff on the returned json/html. It used to work great until for some reason Firefox has stopped opening the jsons automatically. Instead of opening the json response as if it were a regular web page, Firefox asks "What should Firefox do with this file" and prompts me to select a program to open the file with.
How do I force Selenium IDE to make Firefox display the json responses as it used to?
Cases like these are usually Firefox & Selenium IDE version incompatibility. This can be from using a much newer version or an old version of Firefox that the IDE doesn't quite support.
In your case it appears to be an older version issue.
The first step you should do is update both the IDE & Firefox and take it from there.
The release notes also detail what version (range) of Firefox it generally supports.

Automate Chrome console from Desktop app?

I'd like to be able to send info to the Chrome developer console from my application.
For example, my app has some json. I'd like this json to show up in either an existing, or newly created instance of the chrome dev tools console.
Is this possible? If so, any pointers to examples? Note that the platform should be any language, not just javascript. And definitely not a site already running in Chrome. I'm interested in implementing this in another process.
Do you thought of running your app in an environment which is pretty much like a browser?
Node.js
or (this is a whole webkit browser)
phantom.js
Otherwise you could call Chrome directly via commandline and try to simulate the dev tools key stroke like explained here:
Is there a command line argument in Chrome to start the developer tools on startup?
The command of displaying something in the Chrome console is e.g. console.log and it is at the end Javascript. All Console commands are described here:
https://developers.google.com/chrome-developer-tools/docs/console-api
The closest I've seen so far is this library:
https://github.com/ccampbell/chromelogger
which seems to allow logging to the Chrome Console from lots of other server side apis, but no desktop APIs.
This can be done on Mac using osascript. Save the following as a script and run it:
#!/usr/bin/osascript -l JavaScript
var chrome = Application('Google Chrome');
//chrome.activate();
chrome.includeStandardAdditions = true;
var currentTab = chrome.windows[0].activeTab()
currentTab.execute({javascript: 'console.log("Hello")'})

How can Chromium use XUL Runner SDK?

In the credits section of Chromium and Chrome (chrome://credits/) you can find XUL Runner SDK.
I've done some search in the chromium website and didn't find any sign of it nor for what is it used.
I was trying to decide between using something like chromiumembedded, Awesomium, WebKit, XUL Runner, libRocket, etc. so that finding is confusing.
So my question is: Why is XUL Runner SDK in chrome://credits/ ?
You should search the source code to check. The only actual use of the XULRunner SDK appears to be in mock_ie_event_sink_test.h where an accessibility-related file is being included. Constants from that file (like IA2_EVENT_DOCUMENT_LOAD_COMPLETE) are then being used in mock_ie_event_sink_test.cc - a unit test file. So the dependency on XULRunner doesn't seem to apply to any code actually shipping with Google Chrome.

Old Google Chrome automation using Webdriver

I have to automate for Google Chrome old versions such as 5,6,7...till the latest version. I see that chromedriver is available from version 13 onwards. Where can I find for the older version of these?
If I can't automate using webdriver, does selenium 1.0 supports all the older versions of google chrome? Is there a way to merge selenium 1.0 and webdriver?
As stated here (all the way down):
the ChromeDriver is only compatible with Chrome version 12.0.712.0 or newer
That's good news, one more version to work with, it's compatible with Chrome 12+!
Let's read on:
If you need to test an older version of Chrome, use Selenium RC and a
Selenium-backed WebDriver instance:
URL seleniumServerUrl = new URL("http://localhost:4444");
URL serverUnderTest = new URL("http://www.google.com");
CommandExecutor executor = new SeleneseCommandExecutor(seleniumServerUrl, serverUnderTest, DesiredCapabilities.chrome());
WebDriver driver = new RemoteWebDriver(executor);
This is worse, but still good, you can write WebDriver-like code and be backed by Selenium RC. That's written in pure JavaScript and therefore should work in any well configured and JavaScript-friendly browser. Chrome has always been JS-friendly, so chances are you'll get it to work everywhere!