How to get an xpath in IE

if you are testing an application that will work only in IE or the specific scenario or page that has this element will open-up/play-out only in IE then you cannot use any of the above mention tools to find the XPATH.
Well the only thing that works in this case is the Bookmarklets that were coded just for this purpose. Bookmarklets are JavaScript code that you will add in IE as bookmarks and later use to get the XPATH of the element you desire. Using these you can get the XPATH as easily as you get using xpather or any other Firefox add-on.

STEPS TO INSTAL BOOKMARKLETS
1) Open IE
2) Type about: blank in the address bar and hit enter
3) From Favorites main menu select—>Add favorites
4) In the Add a favorite popup window enter name GetXPATH1.
5) Click add button in add a favorite popup window.
6) Open the Favorites menu and right click the newly added favorite and select properties option.
7) GetXPATH1 Properties will open up. Select the web Document Tab.
8) Enter the following in the URL field.

javascript:function getNode(node){var nodeExpr=node.tagName;if(!nodeExpr)return null;if(node.id!=''){nodeExpr+="[@id='"+node.id+"']";return "/"+nodeExpr;}var rank=1;var ps=node.previousSibling;while(ps){if(ps.tagName==node.tagName){rank++;}ps=ps.previousSibling;}if(rank>1){nodeExpr+='['+rank+']';}else{var ns=node.nextSibling;while(ns){if(ns.tagName==node.tagName){nodeExpr+='[1]';break;}ns=ns.nextSibling;}}return nodeExpr;}

9) Click Ok. Click YES on the popup alert.
10) Add another favorite by following steps 3 to 5, Name this favorite GetXPATH2 (step4)
11) Repeat steps 6 and 7 for GetXPATH2 that you just created.
12) Enter the following in the URL field for GetXPATH2

javascript:function o__o(){var currentNode=document.selection.createRange().parentElement();var path=[];while(currentNode){var pe=getNode(currentNode);if(pe){path.push(pe);if(pe.indexOf(‘@id’)!=-1)break;}currentNode=currentNode.parentNode;}var xpath=”/”+path.reverse().join(‘/’);clipboardData.setData(“Text”, xpath);}o__o();

13)Repeat Step 9.

You are all done!!

Now to get the XPATH of elements just select the element with your mouse. This would involve clicking the left mouse button just before the element (link, button, image, checkbox, text etc) begins and dragging it till the element ends. Once you do this first select the favorite GetXPATH1 from the favorites menu and then select the second favorite GetXPATH2. At his point you will get a confirmation, hit allow access button. Now open up a notepad file, right click and select paste option. This will give you the XPATH of the element you seek.

Note : hoping that the above post, which i got from google will help you solve finding xpath… to some extent
Advertisements

Different Firefox add-ons to find the xpath

Follow this post i will add tools further, which will help us to write/find the locator of the web elements in the Web page

just follow the above links on how to download and install addons in your browser.

ABOUT MOBILE APPLICATIONS

What is Web Application

Web applications are generalized for multiple platforms and not installed locally but made available over the Internet through a browser. Eg: Online Banking Services

What is Native Application

Native applications are developed for a specific platform and installed on a computing device. Eg: Camera+ for iOS and Keepassdroid for Android

Hybrid Application:

A hybrid application (hybrid app) is one that combines elements of both native and Web applications Eg: Microsoft Word

Hybrid application features:

  • Can function whether or not the device is connected.
  • Integration with a device’s file system.
  • Integration with Web-based services.
  • An embedded browser to improve access to dynamic online content.

Types of Applications in Mobile fall in to three categories:

1.       Web Based Applications
2.       Pre-Installed Applications
3.       Installable Applications

Web Based Applications

A.      Web Based Applications are built for mobile browsers
B.      Can be accessed by entering the specific url in mobile browser
C.      No installation/un-Installations are required
D.      No upgraded involved
E.       Speed is a critical aspect
F.       User entered values can’t be stored in the device database locally, until user allows storing information in Cache.

Pre-installed Applications

A.      Applications which are shipped as in built software with the mobile device
B.      No Downloads involved
C.      No installation /Un-installation involved
D.      Automatic upgrades can be done but it is software specific
E.       Testing of these Applications in prototypes is very critical
F.       They deal with the core data and functions of the device
a.       If anything goes wrong, the core database might get corrupt
G.     They cannot be uninstalled /deleted over
H.      Crashes can cause severe damage to ROM
I.        Only way to remove the applications is to flush the ROM and upgrade

Installable Applications

  1. Can be upgraded:
  2. -This is specific to the application design
  3. -Also depends on the source from where it is downloaded
  4. -Can be installed/Un-installed from the device
  5. -Can be downloaded from
  6. -AppStore or OTA (over the air) the URL which leads to download of the application

Some of the points to consider while doing Mobile Testing

  • Testing in various network strengths like Low, Medium, High
  • Testing during the change of Network strength from low to high and high to low
  • Testing in various Battery Strengths like Critical, Low, High and during charging
  • Monitoring Battery Consumption pattern while running the application in foreground, Background and for long time
  • Interruptions:  Activities which can occur parallel with in the device while application is being installed, launched, run, exit, uninstalled.
  • Examples of Interruptions like Receiving Incoming call, Lose Network connectivity and regain it, Activated Camera, Remove Battery, Shutdown the device.
  • Testing with different input modes in different platforms .Input modes like Single Touch, Multiple Touch, and Track ball/Track Wheel and key pad etc.
  • Device modes in different platforms
  • Portrait & Landscape
  • UI Should be properly aligned as per mode
  • Test Cases around mode change while running in background

The real challenges that QA would be facing while testing Mobile Application are as below:

  • Time pressure
  • Inadequate processes
  • Lack of physical devices
  • Lack of test plans, Validation issues
  • Diversity in Platforms and different OS currently present in the market such as Android, I-phone etc.

HOW CAN I FIND OUT WHAT GOOGLE AND THE REST OF THE WEB KNOWS ABOUT ME?

Online privacy is a topic that has been important to many people for some time. Reading the Twitter stream, it seems that privacy issues tend to crop up more often than not in relation to social networking sites. Historically that has primarily meant Facebook but now Google is making a decent effort at their own social site; Google+

From what I’ve read and heard it seems that the majority of people like what they have found with Google+ so far in terms of how it functions as a social networking site. The one big area of concern, however, is the fact that the search engine seems quite insistent that users of the service use their real names when signing up. There have even been cases of people getting kicked for using false names.

Now you may argue that linking your real name to a Google+ profile is no big deal as most of us have nothing to hide. I can understand that point but have reservations of my own. The reason why is that I myself have had a ‘stalker’ from my life away from the web – this person has admitted searching for my house on Google maps and was even able to tell me my door number. They are keen to find out as much as possible about me from the web. That is why I have always tended to use a different surname on the internet, only giving my real surname to trusted companies and individuals.

Therefore I’m none too keen on using Google+ right now because of the fact that my real name is required. But how much does Google already know about me? And how much of that information is available to searchers of their services?

Google-Account-Dashboard

Google Account Dashboard

This is where the Google Account Dashboard comes in.

Signing in with your email address and password opens up the page for your account.

Google have added a personal security section to this page. Called, “Me on the web”, which shows just how much information about you there may be on the internet. And the amount of information about you could be huge. I was surprised just how much Google knows about me, including:

  • my full name
  • my home address
  • my blogger account and everywhere I’ve posted with it
  • all the websites I have and have had
  • the date of the next parents’ evening at my son’s college
  • my credit card details!
  • some of the things I’ve bought online
  • a draft post for this site that I had no idea was online
  • my latest searches categorised by web, images, news, products, videos, maps and blogs
  • and various other obvious details such as Gmail contacts and conversations

Me on the web

Me on the web
There is a direct link to Google Alerts which is a handy tool that can be used for many things, including receiving notification when someone mentions your name, email address of web site anywhere on the web. Me on the web even makes suggestions as to which terms you may want to monitor.
There are also quick links to more information on how to manage your online identity, including how you may be able to remove unwanted web pages from Google’s own search results.
Managing your online identity is getting harder and harder. There are legitimate reasons why some people wish to remain anonymous online both in terms of their safety and also as a means of avoiding the constant monetisation of personal information.
Google’s ‘Me on the web’ can help you understand how much of your information is already on the web and offers a little help in managing it.