Skip to main content

Posts

Showing posts from February, 2012

WebDriver - Rare Tips I

1. MouseHover using WebDriver actions. MoveToElement ( element ) . Click ( ) . Build ( ) . Perform ( ) ; 2. ChromeDriver Usage Don't forget to include the ChromeDriver.exe before executing webdriver script. System . setProperty ( "webdriver.chrome.driver" , "c: \\ selenium_downloads \\ google_driver \\ chromedriver.exe" ) ; WebDriver driver = new ChromeDriver ( ) ; driver. get ( "http://www.google.com" ) ; You can look more info from here. https://code.google.com/p/selenium/wiki/ChromeDriver 3. Set to trust all SecurityCertificates RemoteControlConfiguration rcc = new RemoteControlConfiguration ( ) ; rcc. setTrustAllSSLCertificates ( true ) ; SeleniumServer seleniumserver = new SeleniumServer ( rcc ) ; seleniumserver. boot ( ) ; seleniumserver. start ( ) ; setUp ( "https://www.google.com/" , "*firefox" ) ; selenium. open ( "/" ) ; Also you can avoid SSL pro

JavaScript - Overview

Recently I have attended a session on JavaScript basics and very eager to know something we don't know. I am here to discuss some points about JavaScript. -- Basically JavaScript is an Object-Oriented Scripting Language but no relation with Java. Only name have relation. -- Engineer from Netscape company created Scripting Language " Mocha " for their browser Netscape Navigator. Then renamed as LiveScript . -- Then Microsoft created their implementation of Scripting Language for their browser and named as JScript for IE. -- Then ECMA(European Computers Manufacturers Association) took and standardized as ECMA Script . But for marketing purpose they named as JavaScript because Java is familiar in the world. -- We can also create classes using Prototypes like function myClass ( ) {     //some definition }   myClass. prototype . function = myFunc1 ( ) {     // Some function definition } -- Dynamic variable types - No static types of

Best Practices for QTP Tool

Recently saw some good tips to improve the QTP execution in best way with good performance. Here I am sharing those ideas. 1. Always try to use Sync or Exist(2) instead of Wait 2. Always specify parameter for Exist otherwise it will wait up to default timeout value. 3. Use Option Explicit to force use of variables by declaring as it fasten the script execution. 4. Load only required add-ins at start-up. 5. Use Automation  Object Model( AOM ) to automate QTP execution process. 6. Run in Fast execution mode while executing full scripts. 7. Try to avoid Smart Identification feature. 8. Disable Video recording, Active Screens etc unless you required. 9. Always nullify the objects which are used in scripts. 10. Always try to use variables to store test objects and then do operations from that assigned variable instead of doing it in single object hierarchy line. This will fasten the execution. //Use Like this, Dim NameText, PassText Set NameText = Window ( "ma