| 
# | 
Selenium | 
QTP | 
| 
1 | 
Open
  source | 
Paid
  tool | 
| 
2 | 
Works
  on all OS | 
Works
  on Windows | 
| 
3 | 
Tests
  only Web applications | 
Tests
  web and desktop applications | 
| 
4 | 
Works
  on almost all browsers | 
Works
  on IE ,Firefox and Chrome(Partially) | 
| 
5 | 
Code can
  be made in any one of languages such as Java, C#, Ruby, Python, pearl, php
  etc | 
Uses Vb
  Script | 
| 
6 | 
No
  object repository | 
Has got
  an object repository | 
| 
7 | 
IDE
  sometimes does not record some events | 
Recording
  is a little reliable events | 
| 
8 | 
Core
  engine is java script and is very strong  | 
Core
  engine is not java script based | 
 Sample Code :   Dim strPage,strJSON,objIE   strPage = "C:\Jay\JLoader.html"   Set objIE = CreateObject("InternetExplorer.Application")   objIE.Visible = True   objIE.Navigate2 strPage   While objIE.Busy : Wend   strJSON = "{""FirstName"":""Jay"", ""LastName"":""Krishna""}"   Set objWin = objIE.document.parentWindow   objWin.execScript "var jsonStr2XML = function(strJSON) { return json2xml(JSON.parse(strJSON));};"   Msgbox  oWin.jsonStr2XML(strJSON)   objIE.Quit       In Detail:     Converting The most popular data interchange format JSON(JavaScript Object Notation) to XML using QTP/UFT.     Parsing JSON in UFT could be a challenge so we will use JavaScript in UFT to make it perfect.     SO We need :                Java Script API  - To Convert JSON to XML                           JavaScript Files :    ...
Comments