Friday, September 25, 2020

Best Broadband internet connection (Jio, Airtel and ACT)

I normally maintain Jio and Airtel internet connections, as we started working from home due to the COVID I have also added ACT in my backup mechanism. At least one device will be connected to each of the connections all the time so that we would be aware of any connection is down.

For the past 6 months, we have been using the internet connection for my work, children's online classes, and recreation. I am trying to provide feedback based on my experience during the work and I am located in Hyderabad. All the 3 internet connections are powered by APC BR1000IN UPS.  I have considered many parameters like jitter, latency, uptime, speed consistency and ticket resolution, etc. I would rate the internet connections in the following order.

1. Airtel

2. Jio

3. ACT

Friday, February 21, 2020

How to enable Docker experimental feature?

I couldn't find the correct information on Docker.com to enable the experimental features, so I thought of writing this post.

How to find experimental features enabled on your Docker instance?

docker version




































You need to enable both the Client and Server as shown in the above screenshot.

How did I enable on my Ubuntu?

1. I have included the following text at /etc/docker/daemon.json

{
    "experimental": true

}

2. I have included the following text at /home/ubuntu/.docker/config.json

{
"experimental": "enabled"
}

3. Your default user "ubuntu" needs to be added to the "docker" group.

4. Restart the Docker -  sudo systemctl restart docker

Note: If the folders are files that don't exist, create those.


Thursday, November 14, 2013

Mobile - Native vs Web vs Hybrid App

Mobile - Native vs Web vs Hybrid App

Native apps live on the device and are accessed through icons on the device home screen. Native apps are installed through an application store (such as Google Play or Apple’s App Store). They are developed specifically for one platform, and can take full advantage of all the device features–they can use the camera, the GPS, the accelerometer, the compass, the list of contacts, and so on. They can also incorporate gestures (either standard operating-system gestures or new, app-defined gestures). And native apps can use the device’s notification system and can work offline.


Web apps are not real apps; they are really websites that, in many ways, look and feel like native applications. They are run by a browser and typically written in HTML5.  Users first access them as they would access any web page: they navigate to a special URL and then have the option of “installing” them on their home screen by creating a bookmark to that page.

Web apps became really popular when HTML5 came around and people realized that they can obtain native-like–functionality in the browser. Today, as more and more sites use HTML5, the distinction between web apps and regular web pages has become blurry.



Hybrid apps are part native apps, part web apps. (Because of that, many people incorrectly call them “web apps”).  Like native apps, they live in an app store and can take advantage of the many device features available. Like web apps, they rely on HTML being rendered in a browser, with the caveat that the browser is embedded within the app.

Often, companies build hybrid apps as wrappers for an existing web page; in that way, they hope to get a presence in the app store, without spending significant effort for developing a different app. Hybrid apps are also popular because they allow cross-platform development: that is, the same HTML code components can be reused on different mobile operating systems, reducing significantly the development costs. Tools such as PhoneGap and Sencha Touch allow people to design and code across platforms, using the power of HTML.

---

Thursday, August 29, 2013

Selenium 3

Selenium3

Yes, you heard it right. It is almost two years with the release of the Selenium 2, now the team is focusing on the Mobile testing. Developers from the projects Appiumios-driver and selendroid are working to create a suite that support mobile platform.

For more information, select this link.

---

Monday, August 12, 2013

Selebium v2.34.0 is ready for download


Download from this link.

Updated with the following items.
v2.34.0
=======

WebDriver:
* Updated Firefox native event components to support Firefox 22.
* Update synthesized mouse implementation. Mouse moves are
implemented using nsIDOMWindowUtils.
* Finding libX11.so.6 in a slightly more intelligent way: Check that
dlopen actually succeeds, if not found in one of the fixed paths,
look in the LD_LIBRARY_PATH.
* Added ExpectedConditions to check for the visibility of all
WebElements in a List
* Updated the wgxpath library.
* Updated our copy of the Closure compiler and library to the most
recent versions.
* Updated the atoms library, including support for MS pointer events
and refinements to element visibility tests.
* Close all open connections when stopping the SafariDriver server.
* Fall back to a loopback address if the current machine does not
have an external IP address (as will be the case when there is no
internet connection).
* Remove sizzle dependency from the firefox driver. We only needed
this for versions of firefox prior to 3.5, which we no longer
support.
* Fixed Select.escapeQuotes method.
* Added SafariOptions and support for custom Safari extensions.
* Moved Mouse, Keyboard and TouchScreen to the interactions package
where they belong. This has the benefit of also making our build
files simpler once we delete the original versions which have been
deprecated.
* Deprecated the HasTouchScreen interface.
* Fixed condition in Select.select_by_index method to fix case when
selection is performed by index on a multiple select element.
* Implemented an alpha version of a Marionette (WebDriver implemented
natively in Firefox) driver.
* Deprecated IPhoneDriver.
* Added support for the HTML5 "hidden" attribute. If an element, or
ancestor, has hidden attribute make, it is not shown.
* FIXED: 2285: Allow setting default logLevel for standalone-server.
* FIXED: 5609: Adding the ability to redirect firefox process output
to file.
* FIXED: 5669: Add Driver#remote_status for the Ruby remote driver.
* FIXED: 5715: Adding toString method for the event firing
webelement.

WebDriver JS:
* When capturing console output, guard against user scripts that
redefine the console global.
* Improved logging in the test client.
* Use goog.labs.testing.assertThat for the assertThat library.
* Improved stack trace handling
* Defined a webdriver.Capabilities class for webdriverjs.
* Added native ChromeDriver support to WebDriverJs.
* Mark discarded tasks as cancelled to prevent hanging on
asynchronously scheduled callbacks.
* Include the webdriverjs tests in the built npm package. Updated
the README with instructions for running the tests using npm.
* Add native PhantomJS support to webdriverjs.

Grid:
* Update grid for change in behavior of WebDriver's new session
command.
* Fixed handling of JSON conversion errors at node.
* FIXED: 5942: Fix hang of hub when node machine is not available.

RC:
* Fixed RC tests failing in Firefox beta builds. This has been fixed
in two ways:

* Rely on the automation atoms where possible.
* Obtain the document and window from the element the event is
firing from.

In the course of fixing this, all but one usage of "triggerEvent"
was replaced. Because of this, the method has been inlined to the last
call site.
* FIXED: 1646: UTF-8 encoded user-extensions.js support.

---

Wednesday, August 7, 2013

HP UTF (Unified Functional Testing)

HP is new version of the QTP software is UTF (Unified Functional Testing).
I am attending demo offered by HP, post all the details later. Need to see how it can compete with the popular open source tool Selenium.
Mean while go through the following links and video for an overview of the HP UFT.

HP UTF link



---


Friday, August 2, 2013

Programming Languages Popularity


The TIOBE Programming Community index is an indicator of the popularity of programming languages.
For more details select this link.


---




Monday, July 29, 2013

SeleniumWebdriver programming Languages

Selenium Supported Programming Languages



---

Monday, April 29, 2013

WebDriver's Build System

WebDriver's Build System

I was trying to understand how to build the Webdriver and came across the following content(Build Doctor) which can help us understand the Webdriver build system.

WebDriver creator Simon Stewart knows a thing or two about building code. So I was intrigued when he mentioned that he’d written a grammar for Rake, to enable building Java code.

Replacing Ant with Rake has been a compelling idea for some years now. Until now I wasn’t convinced that you weren’t going to have the same issues as Ant – poorly factored builds that rapidly evolve into a project specific DSL. This may change things.

The build system, or grammar as Simon calls it allows you to break a typical monolithic build file down into a collection of fragments. Each fragment can have one or more targets declared, and each target has some attributes. More at CrazyFunBuild.

Simon is undergoing an exceptionally drawn-out email interview on the process:

Your build tool is one of a few new players. What was your motivation for adding to the build gene pool? Were you scratching an itch, or do you have a broader motive?

Definitely scratching an itch. WebDriver started off as a simple java
project, but it quickly became obvious that it’d also be useful to
have language bindings for things like C#, ruby and python. I could
have settled on a separate build tool for each language, but there are
places where a Java component depends on a DLL (for example) Switching
build tools repeatedly when constructing a single logical unit seemed
wasteful, so I started looking around for a build tool that would
provide support for all the languages I wanted to use.

I failed, but settled on rake because it had poor support for everything 

The next problem was that as the project grew, so did the Rakefile. It
ended up being obscenely long and increasingly fragile, and in the end
I was about the only person who would confidently hack around in
there. An obviously sub-optimal state of affairs. The first step in
fixing this was to break out common tasks into functions (because a
Rakefile is just a ruby script in disguise) This still left a pretty
large build file to deal with, so the next stage was to allow us to
break the script into pieces. The obvious issue is that if you do
this, where are paths relative to? The location of the top-level
Rakefile? Or the fragment of code in the subdirectory? Worse, it’d be
unwise to have duplicate task names (“test”) but detecting those while
writing a fragment of a build file would be troublesome at best.

At the same time, I like my builds to be as declarative as possible,
only breaking through the “fourth wall” to scripting when necessary.
Encouraging people to leave lots of little scripts that are the pieces
of a larger application as build files seemed like the worst way of
achieving that goal of “declarativeness”. So, I wrote a parser for a
sub-set of ruby (which mutated into a subset of python) using ragel
that parses build files and generates rake targets based on the path
to the build file and the name of the target in that file. It’s by no
means an original idea: the only thing I can take even a crumb of
credit for is the current implementation (and it’s pretty much
designed to work with selenium, so there are lots of corners cut in
there)

By clearly defining the build grammar, there’s also a chance to
clearly define how paths are interpreted, so that neatly side-steps
that problem. I also provided an “escape hatch” so that you can call
out to other rake tasks as required. Better this is just a thin skin
around other build tools (the java parts delegate to ant controlled
programatically, and the .net pieces use visual studio) but it means
that anyone can read the build files and understand how the source
code, regardless of language, is transformed into a binary.

So, yeah, scratching the itch of “I want a single, declarative build
tool that allows someone not familiar with the other build tools used
to understand how the system works, and which can work with multiple
languages”. Right now, it’s specific to the project, and I’m
comfortable with that: I want to write a browser automation framework,
not a build grammar or (worse) a build tool. 



---

Friday, March 22, 2013

Bug Life Cycle - TFS

Bug Life Cycle - TFS


---

Saturday, March 16, 2013

DDoS Attacks: How to Prepare and Respond


Friday, March 1, 2013

Rapid file duplicator or copier


Recently, I was given a task to check the document processing capability of an application. The objective of the test was to check whether system can consume 2 million documents in one hour duration.

System is configured to consume the documents from the specified folder, but the question is how to create 2 million documents in a folder. Manually copying the files take lot of time and test need to be repeated multiple times. Windows file system don't work optimally when a folder contain more than 5000 files, so need to create sub-folders, each sub-folder containing 4000 files and in total 2 million files.

I have created simple VB script program that use copy method to create duplicate files, it took nearly 20 hours. Then I started redesigning the program that will run the copy method in multiple threads, so that task can be accomplished in 1 hour by utilizing the 100% CPU capacity.

It consists of two programs. Initiator program calls the duplicator program multiple times, so that each program runs in different thread and task is accomplished quickly. Program settings need to be tweaked as per the system configuration, so that threads run in an optimal way, not too many or too less threads.

Program download link

Initiator.vbs 


'Make sure you have enough space on the system, this program run in multiple threads by utilizing 100% cpu
'Just copy the files in any folder, it will automatically create subfolders
'Perform file partations in the optimal way.

FileName = "test.docx" 'Make sure file exist in the folder
NumberOfCopies = 100 'Make sure division with the below number gives reminder 0 -  1000000 (Actual Test)
NumberOfPartations = 10 'Number Of partaions or blocks for the above said file copies  - 10000  (Actual Test)
TimeStampGenerationAfterCopies = 10 'Generate time stamp in the log file after creating som many files - 1000 (Actual Test)
NumberOfFilesInFolder = 4 'Number of files inside each folder - 3000 (Actual Test)


'-------------------------------------------------------------------------------------

'For appending zeros to the file name, so that files are sorted sequently
Zeros = len(NumberOfCopies)

Const ForAppending = 8
count = NumberOfCopies/NumberOfPartations

Set wshShell = CreateObject( "WScript.Shell" )
set fso=CreateObject("Scripting.FileSystemObject")
WorkingDirectory = fso.GetParentFolderName(Wscript.ScriptFullName)

'Check folder exist, else create the folder
strFolder = WorkingDirectory & "\Duplicates\"
If Not fso.FolderExists(strFolder) Then
   fso.CreateFolder(strFolder)
End If

strFolder = WorkingDirectory & "\log\"
If Not fso.FolderExists(strFolder) Then
   fso.CreateFolder(strFolder)
End If

Set MyFile = fso.OpenTextFile(WorkingDirectory & "\log\log.txt", ForAppending, True)
MyFile.WriteLine("###################################################")
MyFile.WriteLine("File Duplication Launch Start:"  & funGetTimeStamp())
MyFile.WriteLine("Total Launches:"  & count)

Start = 1
End1 = NumberOfPartations

for count1 = 1 to count

strFileName =  WorkingDirectory & "\FileDuplicater.vbs" & " " & Start & " " & End1 & " " & count1 & " " & TimeStampGenerationAfterCopies & " " & NumberOfFilesInFolder & " " & FileName & " " & Zeros
wshShell.Run "wscript " & strFileName, 1, False
WScript.Sleep 3000

Start = Start + NumberOfPartations
End1 = End1 + NumberOfPartations


next

MyFile.WriteLine("File Duplication Launch  End:"  & funGetTimeStamp())

Set fso = Nothing
Set wshShell = Nothing


Function funGetTimeStamp()
sDateTIme = Now()

iDate = Datepart("d",sDateTime)
iLen = Len(iDate)
If iLen = 1 Then
iDate = "0" & iDate
End If

sMonth=  mid(MonthName(Datepart("m",sDateTime)),1,3)

iYear = Datepart("yyyy",sDateTime)

iHour = Datepart("h",sDateTime)
iLen = Len(iHour)
If iLen = 1 Then
iHour = "0" & iHour
End If

iMinute = Datepart("n",sDateTime)
iLen = Len(iMinute)
If iLen = 1 Then
iMinute = "0" & iMinute
End If

iSec = Datepart("s",sDateTime)
iLen = Len(iSec)
If iLen = 1 Then
iSec = "0" & iSec
End If


funGetTimeStamp =  sMonth & "_" &  iDate & "_" & iYear & "_" & iHour & "_" & iMinute & "_" & iSec

End Function


FileDuplicator.vbs


'This program need to be called by Initiator.vbs that pass the necessary command line parameters
'Arguments
Set objArgs = WScript.Arguments
StartIndex = clng(objArgs(0))
EndIndex = clng(objArgs(1))
LaunchID = clng(objArgs(2))
TimeStampGenerationAfterCopies = clng(objArgs(3))
NumberOfFilesInFolder = clng(objArgs(4))
FileName = objArgs(5)
Zeros = clng(objArgs(6))
Set objArgs = Nothing

FolderIndex = 1
FileCount = 1


TimeStampGenerationAfterCopies1 = TimeStampGenerationAfterCopies

set fso=CreateObject("Scripting.FileSystemObject")
WorkingDirectory = fso.GetParentFolderName(Wscript.ScriptFullName)

strFolder = WorkingDirectory & "\Duplicates\" & LaunchID & "_" & FolderIndex & "\"
If Not fso.FolderExists(strFolder) Then
   fso.CreateFolder(strFolder)
End If

Length = len(FileName)
JustFileName = Mid(FileName,1,Length-5) '.docx len 5
JUstFileExt = Mid(FileName,Length-4) 'docx len 4

LogFile = "\log\log_" & LaunchID & ".txt"

OrginalFileNamePath = WorkingDirectory & "\" & FileName

Set MyFile = fso.OpenTextFile(WorkingDirectory & LogFile, ForAppending, True)
MyFile.WriteLine("##########################################################")
MyFile.WriteLine("LaunchID:" & LaunchID & "---" & "Start:" & funGetTimeStamp())
MyFile.WriteLine("LaunchID:" & LaunchID & "---" & "StartIndex:" & StartIndex)
MyFile.WriteLine("LaunchID:" & LaunchID & "---" & "  EndIndex:" & EndIndex)
MyFile.WriteLine("LaunchID:" & LaunchID & "---" & "  TimeStamp Generated after number of files:" & TimeStampGenerationAfterCopies)

TimeStampCounter = TimeStampGenerationAfterCopies + StartIndex

if StartIndex = 1 then
else
StartIndex = StartIndex - 1
end if
Const ForAppending = 8

for count = StartIndex to EndIndex
'Logic to append zeros
FileIndexLength = len(count)
FileIndex = count
for count1 = 1 to (Zeros - FileIndexLength)
FileIndex = "0" & FileIndex
next

DuplicateFileNamePath = strFolder & JustFileName & "_" & FileIndex & JUstFileExt
fso.CopyFile OrginalFileNamePath, DuplicateFileNamePath , True

if TimeStampCounter = count then
MyFile.WriteLine("LaunchID:" & LaunchID & "---" & "Total Files Duplicated:" & TimeStampGenerationAfterCopies1 & "---" & funGetTimeStamp())
TimeStampCounter = TimeStampCounter + TimeStampGenerationAfterCopies
TimeStampGenerationAfterCopies1 = TimeStampGenerationAfterCopies1 + TimeStampGenerationAfterCopies
else
end if

if FileCount = NumberOfFilesInFolder then
FileCount = 0
FolderIndex = FolderIndex + 1
strFolder = WorkingDirectory & "\Duplicates\" & LaunchID & "_" & FolderIndex & "\"
If Not fso.FolderExists(strFolder) Then
fso.CreateFolder(strFolder)
End If
End If
FileCount = FileCount + 1

next

MyFile.WriteLine("LaunchID:" & LaunchID & "---" & "  End:" & funGetTimeStamp())
MyFile.Close
Set MyFile = Nothing

'wscript.echo "File Duplication Completed. Total Files:" & NumberOfCopies

Set fso = Nothing



Function funGetTimeStamp()
sDateTIme = Now()

iDate = Datepart("d",sDateTime)
iLen = Len(iDate)
If iLen = 1 Then
iDate = "0" & iDate
End If

sMonth=  mid(MonthName(Datepart("m",sDateTime)),1,3)

iYear = Datepart("yyyy",sDateTime)

iHour = Datepart("h",sDateTime)
iLen = Len(iHour)
If iLen = 1 Then
iHour = "0" & iHour
End If

iMinute = Datepart("n",sDateTime)
iLen = Len(iMinute)
If iLen = 1 Then
iMinute = "0" & iMinute
End If

iSec = Datepart("s",sDateTime)
iLen = Len(iSec)
If iLen = 1 Then
iSec = "0" & iSec
End If


funGetTimeStamp =  sMonth & "_" &  iDate & "_" & iYear & "_" & iHour & "_" & iMinute & "_" & iSec

End Function


Folder structure (Create below folders at any location in your file system)





---




Monday, January 14, 2013

Eclipse - Failed to create Java Virtual Machine

Eclipse - Failed to create Java Virtual Machine.

I have downloaded eclipse and opened the IDE many times. Recently I was performing selenium webdriver setup on my friends machine and came across the following error.



In order to resolve this issue, I have updated the eclipse.ini file located in the eclipse folder, replaced      the  "-vmargs" with "-vm C:\Program Files\Java\jdk1.7.0_09\bin\javaw.exe", this solved the issue.

The order way is to create a short cut for  eclipse.exe and open the properties windows using right click and update the target path as shown below. This is similar to passing the command line arguments while opening the eclipse.



---


Tuesday, December 18, 2012

Selenium 2.28 ready for download


Selenium 2.28
Download from this link.

v2.28.0
=======

WebDriver:
* "null" can now be passed to executeScript
* .Net: Corrected FileUtilities.FindFile() to correctly return the
current directory if the specified file is located there.
* .Net: Introduces the Updating the CustomFinderType property to the
.NET FindsByAttribute. This allows use of custom By subclasses in
the PageFactory. The custom finder must be a subclass of By, and
it must expose a public constructor that takes a string argument.
* SafariDriver: better attempts to catch native dialogs from user
defined onbeforeunload handlers.
* Updating HtmlUnit to 2.11
* Added the PhantomJS bindings to the release. You'll still need to
download PhantomJS itself separately.

RC:
* Implemented getAllWindowNames in WebDriverBackedSelenium
* Implemented openWindow in WebDriverBackedSelenium to allow opening
relative URLs


v2.27.0
=======

WebDriver:
* Added support for native events for Firefox 17.
* Added support for ghostdriver (PhantomJS)
* Adding new capability "enableElementCacheCleanup" to the IE
driver. When set to true, the IE driver will clean the
known-element cache of invalid elements after every page
load. This is intended to keep memory usage down and improve
performance. However, it is an intrusive change, so this
capability is provided temporarily to allow disabling this
behavior if problems arise. The default of this new capability is
"true", meaning this behavior is turned on by default.
* Added shift key handling to the synthetic keyboard actions.
* Modifying scroll behavior in IE driver SendKeysCommandHandler to
call Element::GetLocationOnceScrolledIntoView() instead of calling
the DOM scrollIntoView() function. Should result in less page
scrolling during test runs.
* Checking if CSS transforms on elements, or their parents, are
hiding them and therefore returning they arent visible.
* Add not, refreshed, invisibilityOfElementWithText to
ExpectedConditions.
* Added support for new IE10 pointer events.
* FIXED: 1543: Allowing equal sign in a cookie value.
* FIXED: 2103, 3508: Modified to no longer hang on alerts triggered
by onchange of <select> elements or by onsubmit of <form>
elements.
* FIXED: 2035: Returning a simple result (null) after opening a new
window instead of the window object (that can't be serialized to
JSON).
* FIXED: 2353: Only call blur() for IE if the element is not the
<body> element.
* FIXED: 3043: Better error message reporting when browser launch
fails.
* FIXED: 4490: Checking script evaluation result to prevent null
reference exception.
* FIXED: 4736: Added all of the extended colour keywords to the
Colors enum in support of
http://www.w3.org/wiki/CSS3/Color/Extended_color_keywords.
* FIXED: 4800: Fixed calculation of coordinates for elements in
frames/iframes where the element is scrolled out of view within
the frame.

Grid:
* FIXED: 3818: Generating session identifiers with UUID to prevent duplication.

RC:
* FIXED: 4668: Fixing ability to open relative URLs in WDBS.
* FIXED: 4273: Added getCssCount to the list of the methods
supported by WebDriverBackedSelenium.
* FIXED: 4055: WDBS implementation of getValue for radio buttons now
reflects behaviour of RC.
* FIXED: 4784: Processing locators before use in getCssCount and
getXpathCount.

----

Sunday, November 25, 2012

Selenium - java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property;

Selenium - java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.ie.driver system property;

IE browser will fail with the above mentioned exception if we upgrade the Selenium webdriver with 2.26.

Reason?
From 2.26 vesrion, IE driver got decoupled from selenium jar file and entire IE driver software is stored in a separate exe file, there are 32 and 64 bit versions.
You need to download the exe file similar to chrome driver and use the following code to run the test.

Sample code Java/TestNG

  WebDriver driver;
@BeforeMethod public void StartDriver() { File file = new File("C:/Seleniumjars/IEDriverServer.exe"); System.setProperty("webdriver.ie.driver", file.getAbsolutePath()); driver = new InternetExplorerDriver(); } @AfterMethod(alwaysRun = true) public void StopDriver() throws Exception { driver.quit(); } @Test(groups = { "GoogleTest" }, enabled = true,timeOut = 90000) public void Test_TC_01_1() throws Exception { driver.get("www.google.com"); }

Technical Reason?
IE driver original implementation was in dll using native C++. As per the client language bindings .dll was extracted during run-time.
For Java extracting from the .jar file.
For .NET extracting it from resource package into WebDriver.dll assembly.
Ruby and Python directly relied on the files, no extraction is required, just reference to the path.
The language bindings would use following method to load the dll and expose the API
JNI for Java
P/Invoke for .NET
ctypes for Python
FFI for Ruby
It works fine for simple scenarios, but due to above differences, IEdriver was showing different behavior between language bindings.
The way .NET bindings loading and managing the .dll, it was able to support multiple instances of IE.
Java bindings was not able to support multiple instances.

In order to unify the experience across all the languages, separate process was created IEDriverServer.exe because now the process management is defined my the operating system (Different version of Windows) and client bindings can interact directly with the process API.

As there is windows limitation where 32 bit process can't be loaded with 64 bit dll, separate 32 and 64 bit process are created.

As the IE driver got decoupled from the selenium release, it is possible to ship the fixes of IE driver without having to wait for complete selenium release.

It is easy to debug a standalone dll then dll loaded by the laungage binding.

Thanks a lot to Jim Evans (IE driver and .NET bindings project lead) for sharing the details and contributing to the open source community.

---

Sunday, November 18, 2012

VS2012 - Web Performance Test - Virtual Users Limit

VS2012 - Web Performance Test - Virtual Users Limit.

I was surprised to see there is no virtual users restrictions (Number of users) for conducting load test using Visual Studio 2012 Ultimate. Generally any commercial load test tool fix the tool cost based on the number of virtual users, technologies (AJAX, Flex, Silver-light..) and monitoring agents, now the trend got changed, need to see how other commercial load test tools like HP loadrunner, Neoload change the licence structure.


---

Friday, November 16, 2012

Visual Studio 2012 - Versions for GUI and Performance Testing

Visual Studio 2012 - Versions for GUI and Performance Testing

Recently I started working with CodedUI and Performance testing using Visual Studio. I have VS2012 Professional and didn't find any option to select CodedUI project, so started investigating which all versions of VS2012 support GUI testing and performance testing. Below screen shot helped me to understand the supported versions of VS2012.



Approx cost of VS2012.


---

Thursday, November 8, 2012

Selenium 2.26 is ready for download.

Selenium 2.26
Download from this link.
Following are the major bug fixes and enhancements.
Hats-off to the development team for frequent releases and you determination to enhance the tool.

v2.26.0
=======
WebDriver:
* Updated OperaDriver to 0.15.
* Added transparency support to the Color class.
* Increased lock time a bit for the FirefoxDriver to make tests more
stable on Windows.
* Added the enablePersistenHover capability to allow the user to specify
whether to use the persistent hover thread in the IE driver. Defaults
to true for IE.
* Added support for native events for Firefox 15 and 16.
* Removed deprecation from ChromeDriver constructors that take a Capabilities
object. Also added a method to set experimental options in ChromeOptions
which may be used to set options that aren't exposed through the ChromeOptions
API.
* Fixed SafariDriver to allow calling .quit() consecutively without error.
* Modified FirefoxDriver to use atoms to switch between frames.
* FIXED: 4535: Hover still does not work perfectly in IE.
* FIXED: 4676: Unable to fire javascript events into SVG's.
* FIXED: 4320: Impossible to IE run tests in parallel via TestNG.
* FIXED: 4309: 'Could not convert Native argument arg 0' error with Firefox.
* FIXED: 4593: Alert.accept() Cancels the Resend Alert/Dialog Box.
* FIXED: 4321: Upgrade HtmlUnitDriver to HtmlUnit 2.10.
* FIXED: 4639: Webdriver 2.25 fails to quit on Windows.
* FIXED: 3774: New SafariDriver sessions do not come with a clean profile.
* FIXED: 4375: Executing javascript hangs Firefox.
* FIXED: 4203: Java SafariDriver has limited websocket frame size.
* FIXED: 4165: WebDriver fails on a machine with no IP address.
* FIXED: 3969: SafariDriver should auto-dismiss alerts.

WebDriverJS:
* FIXED: 4648: findElement errros not helpful.
* FIXED: 4687: webserverjs cannot find module in node.js.
* FIXED: 4649: Wrong Content-Length calculation in webdriverjs.
* FIXED: 4425: Webdriver.js regression: webdriver.By.* selectors defect when
using Node.js.

Grid:
* FIXED: 4433: NPE at grid launch if invalid servlet class name is specified.
* FIXED: 4526: elenium node stop responding when there are 2 or more tests
waiting for a specific node.
* FIXED: 2549: "-role hub" doesn't allow Firefox to starts. ---

Thursday, November 1, 2012

Webdriver - Display Browser Version and Name

Webdriver - Display Browser Version and Name.

Tests are getting executed on different browsers, some time getting confused with the browser name and version of the test results, so I have implemented following code to make an entry in the log file.

  String script = "return navigator.appName;";
Temp = (String) ((JavascriptExecutor) driver).executeScript(script);
Print(Temp);
script = "return navigator.appVersion;";
Temp = (String) ((JavascriptExecutor) driver).executeScript(script);
Print(Temp);
  script = "return navigator.platform;";
  Print((String) ((JavascriptExecutor) driver).executeScript(script));

Print() is a user defined method created in our framework, to know more details select this link

---

Sunday, October 14, 2012

Webdriver - Modal dialog support

Webdriver modal dialog support

How to handle IE modal pop-up in Selenium Webdriver?

Modal dialog? When it is called system displays a dialog that user need to deal with before interacting with the rest of the page.

We can handle the modal dialog through selenium2.0 (Webdriver) in IE, but at few places Selenium is getting stuck with the modal dialog, need to use alternative approach to over come this limitations ( Java Robot class). Currently, Selenium don’t support the modal dialog in Firefox, Safari, Chrome and Opera. 

IE support the modal dialog from Version 4.
Firefox added the support from Version 3.
Safari added the support from version 5.1.
Opera don’t support.
Chrome support from initial versions, but has following bugs Issue 16045, Issue 42939.

Other issues:
1.       Modal dialog as popup – Firefox, chrome and safari consider it as popup and default block it, user need to turn it on.
2.       Debugging – We can’t debug the code even on the latest IE9. Firefox, safari and chrome will let us open the Firebug/Web inspector but difficult to debug.
3.       Mobile – Currently no mobile browser support modal dialog.

It is an old API, but it has been added to the HTML5 spec as there are many old applications written using modal dialog, better to eliminate the “Modal dialog” in the new implementation where multi browser support is required  and usefollowing better options.



---

Wednesday, October 3, 2012

webdriver - modal dialog present

selenium webdriver modal dialog present

Recently we came across a situation where there is no modal dialog or alert, but selenium through "modal dialog present" exception, this issue occurred when there are multiple alerts in the same transaction.

Even the JavaScript executor is not working at this stage, I think Selenium team need to remove the "Modal Dialog Present" validation from the executor, so that when can proceed ahead by running code through JavaScript .

In order to overcome this situation we have used alert.dismiss(), so that selenium proceeded ahead without any exception.

---

Sunday, September 23, 2012

Webdriver change-log URL

Webdriver change-log URL

http://code.google.com/p/selenium/source/browse/trunk/java/CHANGELOG

This link will help you understand the changes and bug-fixes made to Webdriver.

--- 

Wednesday, September 19, 2012

Webdriver NodeJS

What languages do Selenium2/ Webdriver support ?


I think many people are not aware of NodeJS.

Selenium server speaks a simple language called the Webdriver Protocol.
We have NodeJS module called wd that has implemented Webdriver protocol in JavaScript.

What is NodeJS? Below screen shot can help you understand




---

Thursday, September 13, 2012

Smartest smart phone?

Smartest smart phone?



---

Sunday, September 9, 2012

SeleniumWebdriver - Page objects Implementation - Part 2

SeleniumWebdriver - Page objects Implementation - Part 2

SeleniumWebdriver - Page objects Implementation - Part 1

After numerous requests, today I have got time to remove the unnecessary and confidential code and upload the entire project.

This framework is built by integrating Selenium2 + TestNG + ANT + VB Script.

It has taken lot of time to develop this framework, as Selenium is open-source I would like to dedicate this framework to the open-source community. Thanks a lot to Selenium Team for developing awesome  tool.


Download Link (Extract the files into a folder, Elclipse can't extract the files)

1. Create new project "MercuryTours" in eclipse, download the rar file and extract directly into new MercuryTours folder of your corresponding work space.
2. Add the Selenium libraries using configure build path and refresh the project. If there are no error, every thing went fine, attaching the screen shot below.
How to setup Selenium?



3. If you have ANT setup, you can directly run the entire project by selecting the "run", attaching the screen shot below OR you can run the test directly in the eclipse by selecting any class or method and hit play.



4. Test results will be automatically stored the following location "C:\Selenium2_Results\MercuryTours" with time stamp. It will automatically send email notifications, update the details in the "SendEmail.vbs".

I hope above framework will be used for those people who are planning to implement keyword driven framework using page objects.

There are lot of things to explain in this framework, I would suggest to go through the part1 and explore the code.

Good Luck!