Skip to main content

Posts

Showing posts from April, 2010

Mobile Theft in BMTC buses

  Well, this is some thing I had heard of and was not expecting to experience. I bought a brand new Nokia 5800 about 6 months ago and have fallen Victim of petty thieves in BMTC buses. I got in to a non Volvo bus near Jayadeva flyover to head to Dairy Circle, IBC Park. This is a mere distance of 2 km or so. Bus was not very crowded and I was standing near front door as my destination was not very far. I noticed a couple of guys who were also standing near me and I assumed that probably they also want to get down near by. As soon as bus started one guy came behind me while two more guys quickly moved near closed bus door. One guy in white shirt was standing next to me. The guy who was behind me came forward and now there were three guys near closed door. Bus stopped on next station and none of them got down nor were they willing to move and give space to incoming passengers. Then was the next stop where I had to get down (and all this while I did not have an iota of impressi

Working With FCK editors

I had troubles working with FCK editors using QTP. As these editors are recorded as “WebElement” it is not possible to perform “Set” operation on them I came across two posts which talk about dealing with this issue,   One is of Tarun’s where in talks about using “object” as well as “DeviceReplay” methods which could be used to simulate control on FCK editor He suggests not using “object” for browsers other than IE as it is supported only in IE     Browser ( " testB " ). Page ( " testP " ). Frame ( "Frame" ). WebElement ( " WebElement " ). object . innerText = " Text ” Browser ( " testB " ). Page ( " testP " ). Frame ( "Frame" ). WebElement ( " WebElement " ). object . innerHTML = "<h1> T ext</h1> ”     While other method uses object “DeviceReply” object to exercise object on which control is brought.   ' Click on Application Object Browser ( " testB &qu

Strange QTP Errors and Possible Solutions

Herein I have listed couple of error which I encountered while working with QTP. Some of these are very cryptic and you just can not guess about their Raison d'être. I have listed these errors hoping it would help a new bird. Error while opening Test On Debug Error with Function Error while using a function whose definition was not available in Action Unable to work with IE Unable to recognize IE window; had to restart the browser General Run Error There have been multiple instances of General Run Error with QTP; they just don’t let u know as to what went wrong. On such instance is when I was mistakenly trying to check a check box which was disabled. Instead of General Run Error, there could have been a more comprehensible error like – “object is disabled…”

QTP AOM File

Here in I have got sample AOM file which invokes QTP test. This file also pushes test results to a designated folder. Herein there is no hard coding of path ant where in AOM file - ################################################## Dim qtpApp 'As QuickTest qtpApplication Set qtpApp = CreateObject("QuickTest.Application") Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable qtpApp.Launch qtpApp.Visible = True qtpApp.Test.Settings.Launchers("Web").Active = False qtpApp.Test.Settings.Launchers("Web").CloseOnExit = True qtpApp.Test.Settings.Run.ObjectSyncTimeOut = 240000 qtpApp.Test.Settings.Run.DisableSmartIdentification = True qtpApp.Test.Settings.Run.OnError = "Dialog" qtpApp.Test.Settings.Web.BrowserNavigationTimeout = 60000 qtpApp.Options.Run.RunMode = "Fast" qtpApp.Options.Run.ViewResults = True qtpApp.Options.Run.MovieCaptureForTestResults = "Never" qtpApp.Options.Web.

Reading Outlook Contents From VB Script

There are instances when an application involves mail delivery for certain app features. one way to automated this is to hook with Outlook and read content of mail (though I am not very comfortable with this approach anyways!) #################################### 'Get the Count of Items in Inbox Set app = CreateObject("Outlook.Application") Set nameSpace = app.GetNamespace("MAPI") Set MyFolders = nameSpace.GetDefaultFolder(6) MsgBox MyFolders.Items.Count 'Read unread items in Inbox Set cols = MyFolders.Items For each mail In cols If mail.unread Then MsgBox mail.subject MsgBox mail.sendername MsgBox mail.body mail.unread=false End If Next ####################################

VB Script and ADO DB

VB Script can be used to establish db connection. This is very useful in QTP for writing db test cases. DB connection can be established for both SQL Server Authentication as well as Windows Authentication - ######################################### Function Func_dbConnect On Error Resume Next 'Creating the Connection Object set cn = CreateObject("ADODB.Connection") 'Setting the Data Source strCS = "Driver={SQL Server}; Server=1.1.1.1; Database=GSBREG_021010; UID=us; PWD=us;" 'Open Connection cn.Open strCS If (Err.Number<>0) Then MsgBox("Login Failed") End If Set Func_dbConnect = cn End Function Sub ExecuteSQLQuery Set cn = Func_dbConnect() 'Creating RecordSet Object Set rs = CreateObject("ADODB.recordset") rs.CursorType = 2 'SQL query FetchAcademicLevels = "Select even_id from allocation_event"_

Google Chrome Crashes

Got this error message once while working on Chrome. Only Google can have such uncanny knack for error message