My Thoughts: April 2012

Thursday, April 26

FAILED CONFIGURATION: @BeforeTest setUpDriver java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.executeAsync()V



Today we have noticed the below errors while running our test scripts.


FAILED CONFIGURATION: @BeforeTest setUpDriver
java.lang.NoSuchMethodError: org.openqa.selenium.os.CommandLine.executeAsync()V
at org.openqa.selenium.firefox.FirefoxBinary.startFirefoxProcess(FirefoxBinary.java:92)
at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:87)
at org.openqa.selenium.firefox.FirefoxBinary.clean(FirefoxBinary.java:225)
atorg.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:76)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:157)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:93)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:136)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:78)



So we have removed Android jars(android_webdriver_library-srcs.jar ,android_webdriver_library ) from our project Build path , then all the scripts started working fine.

We are still searching why this conflict happened and how to overcome this :)

Wednesday, April 25

Setup of Android WebDriver in Eclipse



Here are the Instruction for how to setup Android driver in Eclipse

1. Install  Android SDK 
Download the SDK zip file and unzip in your local computer.
Say download at “C:\android ” location
Go to unzipped folder and click on “Android SDK Manager” and install the following:
         a.Tools
         b.Extras
         c.Android API’s as per your choice (Say Android 2.2 , Android 4.0)

2. Install the ADT Plugin for Eclipse-
Goto Help > Install New Software....>> Add

3.Configure ADT Plugin
Window > Preferences...>>Android
Set the SDK location to where is your Android SDK has been installed.
Location will be something like:  C:\android\android-sdk-windows

4. Add the new AVD
In Eclipse goto Window >>AVD Manager>>
Create new AVD by clicking on “New” button.(Give the AVD  name  and select the Target)

5.Now download the Android APK 
Copy the file and paste it in the “Platform-tools” folder of the unzipped Android SDK.
Location will be something like “C:\android\android-sdk-windows\platform-tools

6. Now start the Android AVD (Which has been created in Step 4) by following below in your Eclipse
Window >>AVD Manager>> Select the created AVD and click on “Start”

7.  Find the installed emulator device id .
open the command prompt ( cmd ) and run the following command 
adb devices
Emulator device id will be something like “emulator-5554

8. Now from the command prompt, go to the “Platform-tools” folder of the unzipped Android SDK
cd "C:\android\android-sdk-windows\platform-tools"

9. Install the Android server by running the following command
adb -s <<emulator-id>> -e install -r  android-server-2.21.0.apk

10. Start the Android WebDriver application by running the following command
adb -s <<emulator-id>> shell am start -a android.intent.action.MAIN -n org.openqa.selenium.android.app/.MainActivity -e debug true

11. Now setup the port forwarding in order to forward traffic from the host machine to the emulator by running the following command
adb -s <<emulator-id>> forward tcp:8080 tcp:8080

If you have any problem then here is the official Reference :



Sunday, April 15

Switching User Agent in Chrome & Safari (Testing Mobile applications)


I am back with one new article , I know you love this one .. This week I have explored one new extension for chrome which is really awesome i.e. " User Agent Switcher For Chrome "

It is really good and very helpful for the one who want to check how their site is functioning in iPhone, IPad , Android and in different browsers .By installing by above addon you can check your site in all devices from your Chrome browser itself.

Most of the time we maight not be having simulators or actual devices with us. SO the best way we can test the functionality of mobile site is by switching the User Agent .{ User Agent  is a string is a series of characters, usually letters and numbers.Different web browsers (Internet Explorer, Firefox, Opera, etc.) would therefore identify themselves with different user agent strings.}

Now coming to Safari browser,It has inbuilt  User Agent Switcher functionality. To Enable this feature goto

Settings>>Advanced then enable "Show Develop menu in menu bar" chekbox.

Now you can see "Develop" menu in your menu bar.

We are done. Now goto Develop>>User Agent and select Device/Browser on which you want to test your site .. It's cool , Isn't it ?? :)

For  Firefox , we already know how to test it .

See you soon with new stuff . Take care ... :)

Wednesday, April 4

Eclipse IAM Buckminster Integration 0.10.0.201003091836 (org.eclipse.iam.feature.buckminster.feature.group 0.10.0.201003091836)Missing requirement: Eclipse IAM Buckminster Integration 0.10.0.201003091836 (org.eclipse.iam.feature.buckminster.feature.group 0.10.0.201003091836) requires 'org.eclipse.buckminster.core [1.1.0,2.0.0)' but it could not be found

Today I tried Install Maven plugin from
http://q4e.googlecode.com/svn/trunk/updatesite-iam/

I got so many errors which reads

Eclipse IAM Buckminster Integration 0.10.0.201003091836 (org.eclipse.iam.feature.buckminster.feature.group 0.10.0.201003091836)Missing requirement: Eclipse IAM Buckminster Integration 0.10.0.201003091836 (org.eclipse.iam.feature.buckminster.feature.group 0.10.0.201003091836) requires 'org.eclipse.buckminster.core [1.1.0,2.0.0)' but it could not be found


If you ever get any error messages like above while installing Maven plugin OR using Maven plugin then try to reinstall Maven plugin again from the below URL.

http://download.eclipse.org/technology/m2e/releases

Goto
Eclipse >>Help>>Install New Software>>

and enter the URl to install Maven Plugin.