Sunday 6 May 2012

How to install Java?

How to install Java?

Click on the 'Free Java Download' button and proceed to download further and install Java on your system.

Java is an open source programming language.
After Java is installed successfully in your system you can see the Java folder is created inside the hard drive you have chosen while installing.

To write code and manage code in Java programming language one can use any editor or one can use IDE as well.

One can use notepad, notepad++ and many editors like that.
Or else one can use Eclipse, Netbeans and many IDE also.

For bigger projects we are supposed to use the IDE or else when the project complexity increases the number of java files also increases then it is not really possible to manage these files without using any IDE.

Saturday 5 May 2012

How to install firebug, & firepath?

How to install Firebug?

Navigate to the link: http://getfirebug.com/  and click on the 'Install Firefox' button.

Now follow the steps and install firebug as an add-on in the Mozilla Firefox browser.

How to install Firepath?

After you have installed firebug you can be able to install firepath.
Navigate to the url: https://addons.mozilla.org/en-US/firefox/addon/firepath/



Click on the button 'Add to Firefox' and follow the steps to install firepath on firebug.

After you have installed firepath successfully you can see as given below:


What is XPath?

XPath is normally called as XML Path.

We use XPath to navigate through elements, and attributes in the XML document.
As per W3C's, the XPath is a major element in XSLT standard - and XQuery and XPointer are both built on XPath expressions.

XPath is the language for finding information in an XML document.

What XPath is?
  • It is a syntax for defining parts of an XML document
  • It uses path expressions to navigate in XML documents
  • It contains the library of standard functions
  • It is vital element in XSLT
  • It is W3C recommendation



Normally in every web-based applications the XPaths or locators are unique addresses for each and every web object. It can be used with selenium to
perform operations on each object present in the webpage. In the web page each web-object has a primary unique XPath.

XPaths are derived from the html paths of the objects. One can install firebug, and on the top of firebug, one can install firpath. Both are installed as addons on Firefox.
 
When one extracts the xpath of the object, one can use that object using Selenium IDE, Selenium RC, or Selenium Web-driver. Xpaths are constants. They do rarely change. If there is a text-box, and the label of the text-box changes but the position does not change then xpath remains the same. Sometimes xpaths alo vary everytime you refresh the page. To handle variable XPath you need to use java-script functions. Varying xpaths always have a pattern.

Difference between Selenium IDE, Selenium RC, Selenium Webdriver

Selenium IDE Selenium RC Selenium Web-driver
Only works on Mozilla Firefox Works on almost all browsers.Does not work on latest version of Firefox/IE Works on latest versions of almost all browsers - Firefox, IE(6,7,8), Opera, Chrome
Record and play/run tool No Record and run No Record and run
No server required to start Server is required to start No server required to start
Core engine is JavaScript based Core engine is JavaScript based Interacts natively with browser application
Very simple to use. If using User extensions, you require knowledge on java script which makes the work a little bit tough. Its a simple and small API Complex and a bit large API as compared to RC
Not at all object oriented Less Object oriented API Purely Object oriented API
Cannot move mouse with it Cannot move mouse with it Can move mouse cursor
Full xpaths have to be appended with 'xapth=\\' syntax Full xpaths have to be appended with 'xapth=\\' syntax No need to append 'xpath=\\'
No Listeners No Listeners Implementation of Listeners is provided
Cannot test iPhone/Android applications Cannot test iPhone/Android applications Can test iPhone/Android applications
Cannot test iPhone/Android applications Cannot test iPhone/Android applications Can test iPhone/Android applications