ISTQB Certified Software Test Engineer

Monday, June 27, 2011

IE Script Error while running Selenium RC


Today while running Selenium RC in IE8 in windows 7 i have got this error.I googled to find a solution for the above error and atlast i was passed.
1.Open command prompt and run it in adminstartor mode.
Right click on CMD and click on Run as Administrator




2.Run Selenium server jar and continue running your tests.

Script error will be fixed and we will get a result

Friday, January 7, 2011

CSS Conditional comments

Cascading style sheets(CSS) conditional comments are used to fix browser issues.They work only for windows ie.Other browsers treat these lines of code as commnets except ie due to their syntax.Here is the example
<!--
<!--[if IE 6]>
.header{
width:600px;
}<![endif]-->
-->

The above piece of code should be added in head section of the html file.
For example if we set the width to 700px in ie6 the width will be reset to 600px due to this conditional comments.
So we can solve ie cross browser issues using this by writing styles individually for each ie.
U can have clear idea on this conditional comments with this example
<p><!--[if IE]>
According to the conditional comment this is Internet Explorer<br />
<![endif]-->
<!--[if IE 5]>
According to the conditional comment this is Internet Explorer 5<br />
<![endif]-->
<!--[if IE 5.0]>
According to the conditional comment this is Internet Explorer 5.0<br />
<![endif]-->
<!--[if IE 5.5]>
According to the conditional comment this is Internet Explorer 5.5<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is Internet Explorer 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is Internet Explorer 7<br />
<![endif]-->
<!--[if gte IE 5]>
According to the conditional comment this is Internet Explorer 5 and up<br />
<![endif]-->
<!--[if lt IE 6]>
According to the conditional comment this is Internet Explorer lower than 6<br />
<![endif]-->
<!--[if lte IE 5.5]>
According to the conditional comment this is Internet Explorer lower or equal to 5.5<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is Internet Explorer greater than 6<br />
<![endif]-->
</p>


Copy the above code and save in html file and run the html file in different ie versions,so that u can clearly understand coditional comments

Friday, November 19, 2010

How to Block a website access in your machine

How can we block access to Orkut in our machine?Even if we are trying to access ,it should not open...

This is a doubt and order from one of my friends.So I have to answer him,googled and found a solution for this .Blocked orkut in my laptop.

Here is the solution
In
C:>WIndows>system32>drivers>etc

we will find a file called hosts.

Open this file with notepad.Just append this line at the end of file

127.0.0.1 (domain name or url u want to block)

for example 127.0.0.1 www.orkut.com.

Open any of the browsers and try to access orkut now,it will show oops the site u r trying to access is wrong(Not exactly this message,some kind of message like this)

It will work only if we access the site using domain name.If we are using ip this technique will not work.

Again if you want to give access to the blocked site just remove the added entry in hosts file.

Brb.... :)

Wednesday, November 17, 2010

Difefrence between Verify and Assert in Selenium

In selenium while using IDE or RC we will find two methods for

1.Verification
2.Assertion

We know that both are used to find whether a given text(input) was present or not in the loaded(opened)webpage,but why there are two methods defined when they are behaving in a same manner??

There is a difference between these two methods

When we are executing a testcase of 10 lines(assume a testscript of 10 lines in which we used both verify (4line)and assert(6 line)),When Verify text failed(means the input text was not there in the loaded page) it gives the test result as failed but all the steps after this Verify statement were executed till the end of the scrpit.

Coming to Assert if assertion failed, testcase aborted from that line and will stop executing the remaining statements in the script

:)

Monday, November 15, 2010

Test Automation Framework

A framework is an integrated system that sets the rules of Automation of a specific product. This system integrates the function libraries, test data sources, object details and various reusable modules. These components act as small building blocks which need to be assembled to represent a business process. The framework provides the basis of test automation and simplifies the automation effort.

These are the various types of automation frameworks

Data-driven testing:Test Scripts are executed based on the data

Modularity-driven testing :Test Scripts are created based on small and independent modules

Keyword-driven testing :
The keyword-driven testing methodology divides test creation into two stages:-

Planning Stage
A simple keyword (one action on one object), e.g. entering a username into a textfield

Implementation Stage

or test designers (who don’t have to know how to program) write test cases based on the keywords defined in the planning stage that have been implemented by the engineers. The test is executed using a driver that reads the keywords and executes the corresponding code.

Hybrid testing :The hybrid Test Automation Framework is what most frameworks evolve into over time and multiple projects


Model-based testing: Model-based testing is the application of Model based design for designing and executing the necessary artifacts to perform software testing. This is achieved by having a model that describes all aspects of the testing data, mainly the test cases and the test execution environment. Usually, the testing model is derived in whole or in part from a model that describes some (usually functional) aspects of the system under test (SUT).

Will update each approach in detail :)

Friday, July 23, 2010

"Windows was unable to find a certificate to log you,on to the network [SSID]"

While using wireless network some times it will show the following message
"Windows was unable to find a certificate to log you,on to the network [SSID]",and connection to the network fails. In such cases change the properties of wireless network in the following manner.
1.Click on Control panel from start menu.
2.Now in control panel click on Network Connections.
3.List of Networks will be visible.Select the wireless network concerned.
4.Right-click on the network and click on properties.
5.Wireless Network connection properties window will be opened.

6.Then Click on wireless networks tab in that window

7.Select the preferred network and click on properties of the preferred network.

8.Change the Network Authentication Select box value to "WPA-PSK" and Data Encryption as AES.
9.Enter the Network Key and confirm the Network key and click on Ok.
10.Now the wireless will be connected successfully.

Tuesday, July 6, 2010

Handling download popup usin selenium

Handling popups in web applications was not supported by many of the automation tools.Selenium is an open source tool which is supporting this feature.
However selenium is capable to handle only the HTML popups.There are some other popups called "Windows popups" example download popups, which are related to OS.These download popups are not handled by the selenium.
We need to use a tool called "autoit" to handle this popups.

Download the autoit exe from auto it site and pass the name of the exe as an argumnet.

If u r using java call this using execute method.
if u r using perl call this using system function