Quality is delighting customers
working with QTP 11 on web appln :
I have recorded the Gmail application , login and inbox and signedout, while executing the application(recorded), it was not recognizing the inbox object, showing error , inbox is not in the Object repository, when i open OR, inbox object is existing, when i highlighted , i found complete frame is highlighted, so whats the solutions for this.
For this situation,check the add inn's before running the script or reinstall QTP 11 again and run the test or you can use descriptive programming and solve it....
Vamsi: Can you tell me in precisely whether while recording the objects were recognised? and when u ran it didnt?
See normally when u record inbox may have few XX unread mails so it gets recorded. By the time you re run the script inbox may be having YY unread mails due to which qtp cannot recognise object.
Solution is use regular expression
regular expression : Inbox\([0-9]+\)
pls try in this way... u r saying inbox object so it means inbox object may contain some number. for example the object is inbox(2) when u recorded... so while executing ur script this number may change or just a simple inbox with out the number. this type of error is handles through reg ex.
pls send me the code snippet so that i can look in to that and send u the right solution.
Please dont use GMAIL UI for sending email, there is a COM and it is very efficient. Here is complete code for you.
Dim iMsg, iConf, Flds
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 465
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "your_Gmail_id"
Flds.Item(schema & "sendpassword") = "your_password"
Flds.Item(schema & "smtpusessl") = 1
' message body
strDate = CStr(Date()) & " " & CStr(Time())
strBody = "---===---<br/> This is a Test Mail " & strDate & " <br/><br/>"
strBody = strBody & "---===---"
.To = "Sender Name a href="mailto:email@example.com">firstname.lastname@example.org>"
.From = "Receiver Name a href="mailto:email@example.com">firstname.lastname@example.org>"
.Subject = "This is Test Mail " & strDate
Set .Configuration = iConf
' release interfaces
Set iMsg = nothing
Set iConf = nothing
Set Flds = nothing
But there is a limitation.
Few Corporate companies will not allow bulk email sending. So check with below options first:
Open CMD window and type below command:
Telnet smtp.gmail.com 465
If you connected to telnet then you are good else your proxy server is blocking and you have to ask your Network team to help you.
Note: After connecting to telnet use quit command to return to command prompt.