Thursday

Testing Job Market in Australia



Since I have been in Melbourne for a while now and mostly I get the same questions about what's the job market in Australia like?

Here are my few cents:
  • The job market is improving for software testers and quality engineers; however, the skills and experience needed to get hired have changed. 
  • It is more common, at least where I'm geographically located, to see companies hiring testers with specialized skills like automation/performance/security (Not that manual testers are not needed but the ratio of jobs are lesser)
  • People ask for local experience but if you are good there is no one stopping you from getting the first break
  • There are two major domains to look out for here: Finance and Betting (Doesn't matter what you get into they have many similarities when it comes to testing and automation)
  • I can advice people with automation skills that if you are relying only on the next three alphabets here : QTP then you better add more opensource tools like Selenium Webdriver to your profile. The world here is mostly open source and that's the way to go!
  • Last advice from me is that If you think you can get a job sitting back in your country , then you are wasting your time. There are many locals here who have almost the same skills as yours and are available at a very short notice. 
I think I have covered the basics here, If you are looking at specifics feel free to drop a comment here.

Happy Testing :)

Make excel open hyperlink in a different browser


If you do not like Internet explorer for whatever reasons. I am sure even though you have set the default browser to either chrome or Firefox , excel ends up using IE !!

The problem: when clicked in Excel, this link ONLY opens in Internet Explorer

Solution that works: 

Add a new key to the registry:
  1. Go to HKEY_CLASSES_ROOT\jpegfile\CLSID
  2. Right-click on (Default) and select Modify
  3. Enter the value {FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}
This will now change the open-with behavior in MS Excel 2010 - Excel 2013 to use the default Windows app. Confirmed to work with Excel 2010-2013 and Windows 7.


Happy automating ;)

Wednesday

XPath locators in Selenium Webdriver



If you have been using webdriver you would know the paramount nature of Xpath! I have a lot of colleagues who start googling every-time they get stuck with trying to find an element.

Some classic examples are:

Xpath to find the occurrence of a webelement with same properties or attributes:
//*[@name='Test'])[3]
We are finding the third occurrence where the name attribute is Test
Remember: The [] operator has higher precedence (priority) than the // abbreviation.

//div[text()='phys_tag_desc']
If the text is not exact match. Try following:
//div[contains(text(),'phys_tag_desc')]

Radio Buttons - //input[@value='2']

iFrames - //iframe[@id='iframePage']

Here is an exhaustive list that will help you for sure:

Whole web page xpath=/html 

Whole web page body xpath=/html/body
Element with id 'Test' 
//Element [@id='test'] 
Any element with id test
//*[@id='test'] 

Second element anywhere on page
xpath=(//element)[2] 

Image element //img
Element with attribute containing text 'test'
//Element[contains(@attribute,'test')

Element whose attribute starts with 'test'
//Element[starts-with(@attribute, 'test')] 

Element1 with id A or element2 with id B
//Element1[@id='A'] | //Element2[@id=B] 

Element with id A or id B
//E1[@id='A' or @id='B']

Element with name N & specified value ‘v’ 
//*[@name='N'][@value='v'

Link element //a 

containing text 't' exactly
//a[.='t']

with target link 'url'
//a[@href='url'] 

First child of element  
//E/*[1] 
First child 
//E[1] 

Last child of element E 
//E/*[last()] 

Last child 
//E[last()] 

Element with no children 
//E[count(*)=0] 
Element with an only child 
//E[count(*)=1

Cell by row and column (e.g. 3rd row, 2nd column) 
//*[@id='TestTable']//tr[3]//td[2] 
//*[@id='TestTable'].2.1 } 
Cell immediately following cell containing 't' exactly 
//td[preceding-sibling::td='t'] 
Cell immediately following cell containing 't' 
//td[preceding-sibling::td[contains(.,'t')]] 

User interface element that is disabled 
//E[@disabled] 
User interface element that is enabled 
//*[not(@disabled)] 
Checkbox (or radio button) that is checked 
//*[@checked] 
Enjoy XPathing :) 

Tuesday

Unable to find a javac Perhaps JAVA_HOME does not point to the JDK


If you have imported an existing project in eclipse , especially when you want to setup the test environment on a new machine you sometimes see this error "Unable to find a javac; Perhaps JAVA_HOME does not point to the JDK"

Unable to find a javac; Perhaps JAVA_HOME does not point to the JDK


This is a common error that I have seen a couple of times hence the solution:

Solution that did not work :
Select the JRE by going to the Window-->Preferences-->JAVA-->Editor-->Installed JRE

Solution that worked: 
Simple just download tools.jar 
and add tools.jar file in window->preferences->ant-> runtime-> Global Entries
once done you will be all set!

Here are some screenshots:
C:\drftpd>ant
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre6\li
b\tools.jar
Buildfile: build.xml

compile:
[echo] Compiling 1.4 compatible slave files
[javac] Compiling 63 source files to C:\drftpd\classes

BUILD FAILED
C:\drftpd\build.xml:140: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre6"

Total time: 3 seconds


Even though the JAVA_HOME is set to C:\Program Files\Java\jdk1.6.0_10\bin as you can see here:
Image
Copy C:\Program Files\Java\jdk1.6.0_10\lib\tools.jar to C:\Program Files\Java\jre6\lib\ext