For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
Course Name Date Time Duration Type Location
An important update from QtpSudhakar. I stopped giving classroom training in MindQ Systems. I have bigger plans and I want to put an end to regular classroom training because very less people are practicing. From now onwards every session of mine is going to have explanation and practice. Everyone should practice in presence of mine and should go out of classroom with practical knowledge. So I started my own institute AnyTechLabs in Madhapur. Please reach out to +91-8328152362 for course details. Visit AnyTechLabs.com for address details.
Selenium + Cucumber 24th October 7.30 AM IST to 9.00 AM IST 45 Days WeekDay Online

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Tuesday, April 27, 2010

Set Value in EditBox Using DOM

Function SetValueinEditBox(PageObject,EditName,Value2Set)
 Dim EditObjects
 Dim Edit
 set EditObjects=PageObject.getElementsByTagName("INPUT")
 For each Edit in EditObjects
 If lcase(Edit.name)=lcase(EditName) and lcase(Edit.type)="text" then
 Exit for
 End If
 Set EditObjects= Nothing
 Set Edit=Nothing
End Function
'Using above Function without QTP
'Create Internet Explorer Object
Set IE=CreateObject("internetexplorer.application")
'Make it Visible
'Navigate to a URL
IE.Navigate "http://google.com"
'Get Document Object
Set PageObject=IE.Document
'Set Value in Google Search Edit Box
SetValueinEditBox PageObject,"q","qtp sudhakar"
'Using above Function in QTP
'Open internet explorere with specific URL
SystemUtil.Run "iexplore.exe","www.google.com"
'Get DOM Page object using .Object property
set oPageObject=Browser("name:=Google").Page("title:=Google").Object
'Set Value in Google Search Edit Box
SetValueinEditBox PageObject,"q","qtp sudhakar"

Please send your Suggestions and Doubts to my yahoo group http://in.groups.yahoo.com/group/qtpsudhakar

No comments :

Post a Comment