A wildcard character can be used to substitute for any other character or characters in a string.1 This means, we can use a wildcard to make our descriptions more generic. For example, if the property ‘file name’ of an Image is ‘getAllAttributes.JPG’, we can use a wildcard several ways:
' Only using the first 2 words: getAll Browser( "title:=MyTitle" ).Page( "title:=MyTitle" ).Image( "file name:=getAll.*" ).Click ' Using 1 word (Attributes) with the extension (JPG) Browser( "title:=MyTitle" ).Page( "title:=MyTitle" ).Image( "file name:=.*Attributes.*JPG" ).Click
Let’s put this technique into practice. Let’s use Mercury Tours for this test. Let’s try to identify the banner image (banner2.gif) having the following text embed: ‘one cool summer ARUBA’.
Browser("title:=Welcome: Mercury Tours").Page("title:=Welcome: Mercury Tours")_ .Image("file name:=banner2.gif").Highlight Browser("title:=Welcome: Mercury Tours").Page("title:=Welcome: Mercury Tours").Image("file name:=banner2.*").Highlight Browser("title:=Welcome: Mercury Tours").Page("title:=Welcome: Mercury Tours").Image("file name:=banner.*").Highlight Browser("title:=Welcome: Mercury Tours").Page("title:=Welcome: Mercury Tours").Image("file name:=ban.*gif").Highlight Browser("title:=Welcome: Mercury Tours").Page("title:=Welcome: Mercury Tours").Image("file name:=ban.*f").Highlight
Ofcourse, there are more ways to identify the banner image, but I’ve only used the above 5. Similarly, we can use this wildcard character for the Browser and Page objects:
' Without wildcard(s): 0.20 seconds Browser("title:=Welcome: Mercury Tours").Page("title:=Welcome: Mercury Tours").Image("file name:=banner2.gif").Click ' With wildcard(s): 0.30 seconds Browser("title:=Welcome.*").Page("title:=.*Mercury Tours").Image("file name:=banner2.gif").Highlight ' 0.28 seconds Browser("title:=Welcome:.*").Page("title:=Welcome.*").Image("file name:=banner2.*").Highlight ' 0.56 seconds Browser("title:=.*Mercury Tours").Page("title:=.*: Mercury.*").Image("file name:=banner.*").Highlight ' 0.61 seconds Browser("title:=.*Mercury Tour.*").Page("title:=Welcome:.*").Image("file name:=ban.*gif").Highlight ' 0.51 seconds Browser("title:=.*: Mercury.*").Page("title:=.*Mercury Tour.*").Image("file name:=ban.*f").Highlight
You might notice a little drop in performance for some of the above statements. This is quite obvious though. Using a real world example:
Scenario 1
If you were asked to deliver a letter to John and you had the following piece of information provided: Building 184, Floor 5, Room 120, Desk 9. You would know that you first have to find Building A, then take an elevator to the 5th floor, find Room 120, and once you’re inside room 120, John sits on Desk # 9. This is quite straight-forward and ofcourse you’ll be able to quickly find John.
Scenario 2
In another scenario, if you were asked to deliver a letter to John who is in Building 184 and on the 5th floor, how would you find John? You would have to go to each room and ask for John, and make sure it is the correct John before delivering the letter to him. This might take longer.
This is roughly what happens in our scripts. As our descriptions get more and more generic, the time it takes to identify the object increases. Therefore, even though wildcard characters can simplify our work, we should be a little careful how we use them.
Regular-Expressions.Info is a good source to learn regular-expressions. We will now do the exact same test we did about with Banner2.gif, but this time using some more regex style characters.
' Using the first few characters of the title and the first few characters of the image Browser("title:=Welc\w+\D+\w+").Page("title:=Welc\w+\D+\w+").Image("file name:=ban\w+\d+\.\w+").Highlight ' Using the last few characters of the title with first and last characters of the image Browser("title:=\w+\D+\w+ours").Page("title:=\w+\D+\w+ours").Image("file name:=b\w+2\.gif").Highlight ' Same as above for Browser and Page, but '...' for image Browser("title:=\w+\D+\w+ours").Page("title:=\w+\D+\w+ours").Image("file name:=b\w+2\....").Highlight ' Same as above, but replaced 'b' with a '.' Browser("title:=\w+\D+\w+ours").Page("title:=\w+\D+\w+ours").Image("file name:=.\w+2\....").Highlight
In the proceeding article we will cover Ordinal Identifiers and also see how to create a simple test module for a login process.
Descriptive Programming Series
- Descriptive Programming (DP) Concepts – 1
- Descriptive Programming (DP) Concepts – 2 {Regular Expressions}
- Descriptive Programming (DP) Concepts – 3 {Ordinal Identifiers}
- Descriptive Programming (DP) – 4 {Creating a Test Script)

{ 66 comments… read them below or add one }
Hi
Suppose we have a web table as shown below . Evry time profile for Onkar has been displayed even if i click on view profile button in front of Same .
Onkar View Profile (link)
Chetan View Profile (link)
How do i write code with DP to display view profile for Chetan ?
Onkar, you can loop the WebTable rows to do so. Example:
Set oWebTable = Browser("").WebTable("") For ix = 0 To oWebTable.GetROProperty("rows") If oWebTable.GetCellData(ix, 1) = "Chetan" Then oWebTable.ChildItem(ix, 2).Click End If Nexthi,
Sir please send me 3+years QTP tesing sample resume to my mail please send me sir.
hai anshoo sorry to say this for my last query none replied me :(….hope i get something from anyone of you for this query
i had run a script yesterday, got the expected output and today i re-tested the script which i run yesterday, now the issue is how can i compare my yesterday’s expected output and today’s expected output? and say that they both match? is this possible with regular expression? if yes how? if not then in which way? please explain step by step.
Eagerly waiting for the answer…please do reply
thanks in advance
yogitha.
Yogitha, there are 2 ways you can do this:
1. Allow QTP to wait until a specific time so the values to be validated are in memory – not preferable if QTP is to wait several hours
2. Store values externally – using text, xml, xls etc. At validation time, you can pull values from these external sources (expected values) and validate against what you have in the UI
Thank you so much for the response Anshoo and if u have any material for qtp kindly mail me as am preparing for interviews so please make some time and send me some good stuff, by which i can understand the concepts in its easiest way and give my best in interview’s my id alonevrenda9@gmail.com
Thanks once again Anshoo
Anyone who has good qtp material please send to above mail id.
Thanks in advance.
Hi All,
Can u plase suggest how to display the combo box(entire list to select) in web application while running the scripts in QTP. We have so many combo boxes in the application n we are asked to write the scripts
JP, use ChildObjects..
web elments are displaying in tree view format. How to get the values of those web elements. Appreciate your help
hi admin,
I dont know how to select the Combo box using data table,i want to select and value in drop(HQ,Satellite office,etc.,) i have executed this code can u please go through it and send me a necessary solution ASAP
Dim n,m,i
datatable.Import (“C:\Program Files\HP\Employee detail.xls”)
msgbox 1
For i=1 to n
datatable.SetCurrentRow(i)
Branch=datatable.Value(“Branch”)
Employeefirstname=datatable.Value(“First Name”)
m=datatable.Value(“Branch”, 1)
msgbox m
datatable.SetNextRow
Next
browser(“name:=VCIDEX Management System”).Page(“title:=VCIDEX Management System”).WebList(“html id:=ctl00_Content_cboBranch”).Select Branch
Hi Anshoo,
Could you please suggest me by descriptive program to solve my problem? I’ll appreciate.
Q. My ordinal identifier keep changing (index or location).Every every time I run the script It’s failed because of ordinal idenfier number. There is any I can do regular expression for ordinal idenfier number>Please help me out. Thank you
zakir
Zakir: Can you point me to the application? Generally if the index is changing, you can use ChildObjects, Visual Relational Identifier, WebTable methods depending on what type of source it has..
Hi Anshoo,
Can u pls help me regarding how in a dotnet grid i can verify a particular checkbox is enabled or not??
Hey Anshoo,
Can you please explain me the following regular expression pattern.
Browser(“title:=Welc\w+\D+\w+”).Page(“title:=Welc\w+\D+\w+”).Image(“file name:=ban\w+\d+\.\w+”).Highlight
Hi Anshoo,
i’m unable to add any objects in a particular window to the object repositry. when i add the complete window,it adds and deletes itself.
please suggest a solution for this strange problem.
Note: This is happening for only few of the windows
Thanks in advance
I don’t think I will be able to help you with this. Your best option may be to contact HP Support.
Anshoo,
I am facing a problem where the name of the frame of the AUT is changing on runtime.
I have tried using Reg exp ( along with DP ) but it is not helping.
Can u suggest a way which will help me identify the objects on runtime .
Thanks :)
Mini,
You can skip the Frame from the object hierarchy or use RegEx for it.. For example, replace the below statement:
Browser("").Page("").Frame("").WebElement("").Clickwith:
Browser("").Page("").WebElement("").Click 'or Browser("").WebElement("").Clickor:
Browser("").Page("").Frame("name:=.*partialDescription.*").WebElement("").ClickDear Anshoo,
Hope you are doing great! I appreciate the effort you had taken and share your knowledge with us.
My application is SAP and the requirement is to enter a value into the text box which present in SAPGrid. So my code is like this,
SAPGuiSession( ).SAPGuiWindow( ).SAPGuiGrid( ).SetCellData 1, “Selection Value”, DataTable(“Broker_Report, dtLocalSheet)
The problem is here that the code puts the value correctly in to the textbox and we could see the value in the application. But, the application says that there is no value in the text box. So, I manually copied the value and pasted into the textbox. Now, the application recognizes the value. Could you please help me how do I set the value to the text box which would be recognized by the application?
Thanks,
Sivaram S
Sivaram,
I haven’t had a chance to work with SAP controls in relation to QTP. But, this is quite a similar issue to what we see in Web apps when custom controls are implemented. Have you tried using SendKeys to set values, or DeviceReplay?
Hi Sivaram,
I did work on the SAP application using QTP earlier……………for very short time though,
May be the text box is present as the grid but still you can make the text box focus by using
SAPGuiSession(“Session”).SAPGuiWindow(“SAP”).SAPGuiEdit(“your grid name”).SetFocus
SAPGuiSession(“Session”).SAPGuiWindow(“SAP”).SAPGuiEdit(“your grid name”).Set “your value”
SAPGuiSession(“Session”).SAPGuiWindow(“SAP”).SendKey ENTER
for sure this wil work…
thanks!!!
do reply for this whether it is working, if not please paste the error here in the same reply.
Dear Anshoo,
Hope you are doing great! I appreciate the effort you had taken and share your knowledge with us.
My application is SAP and the requirement is to enter a value into the text box which present in SAPGrid. So my code is like this,
SAPGuiSession( ).SAPGuiWindow( ).SAPGuiGrid( ).SetCellData 1, “Selection Value”, DataTable(“Broker_Report, dtLocalSheet)
The problem is here that the code puts the value correctly in to the textbox and we could see the value in the application. But, the application says that there is no value in the text box. So, I manually copied the value and pasted into the textbox. Now, the application recognizes the value. Could you please help me how do I set the value to the text box which would be recognized by the application?
Hi,
Scenario:
I have a form whose title is “form: New” on launching and after filling in the fields upon saving the form, the title becomes
“form: name” where name is text field which I have entered in the form, so how do i regex this title, and I have the object in the
OR whose name and title are the same “form” New”,
so soon after saving this the line of code
Browser(“title:=form: New”).Page(“title:= form: New”).any method is not working can u please give me the suggestion in this
thanks in advance
Uday
Uday,
You can use the following regex:
form: \D+. In your QTP code, you can use the following:Browser("title:=form: \D+").Page("title:= form: \D+").Hi Anoshoo Arora
my question “ranjith123″ this will be go for Regular Expressions
Hello Anshoo!!
Relly Good stuff yaar…I have a question for you. I have a web edit box of type multi line. Now I need to enter two names in that. I need to set the first name in first line and the second name needs to be entered in the next line. Second name should not be entered in the first line. Do you have any answers for me. (Need to enter 10 names in 10 different lines of a web edit box of type multi line).
Thanks!!
You can use vbNewLine to insert names in different lines:
Browser("").Page("").WebEdit("").Set "John" & vbNewLine & "Smith"Hi Anshoo,
I am using descriptive programming for a particular functionality. I came across the below scenario and not able to proceed further.
The scenario is like, when I click a particular tab in my application, it is opening a fresh page and the page title is “title:=Financial Details–Encounter Date/Time-14/06/2010 16:55″. The data and time changes are the system date and time. My question is whether it is possible to manage the date and time using Regular expression. If so, can you please help me out with the solution.
Yes it’s quite possible.
use this Description for ur page title-
“title:=Financial Details–Encounter Date/Time-.*″
Thanks Satya :)
One moreQuestion from my end.Please suggest
I have to capture one value from the dropdown list my dropdown list will have values like
XXXXX $ XX – XXXX
i need to capture the value after $ and need it to assign it to an variable so that i can work on it.
Please advice how to do it using Regular Expressions
Thanks,
Sai
Considering yours is a Web application, you can do this:
allItems = Browser("").Page("").WebList("").GetROProperty("all items") arrAllItems = Split(allItems, ";") For ix = LBound(arrAllItems) To UBound(arrAllItems) If IsRegExMatch(arrAllItems(ix), "^.{5} \$ .{2} – .{4}") Then sVar = arrAllItems(ix) End If Next sVar = Trim(Split(sVar, "$")(1)) MsgBox sVarThankyou Anshoo.. i will let you knowthe Results after testing it..
Hi Anshoo,
Need a help in writing a function
### My code ###
k = objectproperties(pageheading,"Yahoo") --** yahoo is in double Quotes pageheading_exist = browser(XXX).page(XXX).webedit(k).Exist if pageheading_exist = "True" then Report Pass... ###My Function### Public Function objectproperties(x,y) set x = Description.create x("visible") = "True" x("outertext") = y '**** My Problem is how to return the value of this x(which consists of object properties) for this function End FunctionPlease advice.
Thanks,
Sai
If you would like to return the
xdescription object, you can do this:Public Function objectproperties(x,y) set x = Description.create x(“visible”) = “True” x(“outertext”) = y Set objectproperties = x End FunctionHi Anshoo,
Since I daclare the value “Green” to C (C = “Green”) how will I select “C” in a Weblist?
Where the value in the Weblist is “Green (123)”?
It does not recognize “Green” in the Weblist, because the value in the Weblist is “Green (123)”.
I tried using this code:
Browser("blah").Page("blah").WebList("blah").Select ""&C&".*" Browser("blah").Page("blah").WebList("blah").Select ""&C&.*"" Browser("blah").Page("blah").WebList("blah").Select "&C.*" Browser("blah").Page("blah").WebList("blah").Select C.*But all these codes does not work.
about
http://relevantcodes.com/descriptive-programming-dp-concepts-2-regular-expressions/#comment-1898
How will I execute “Public Function RegexSelect(ByVal Object, ByVal sItem)”?
do i need to call RegexSelect Function()?
is there any values I need to pass for “(ByVal Object, ByVal sItem)”?
Respectfully Yours,
The first thing we need to do is to load the function in our library and associate the library with our test. The following code goes in your library:
Public Function RegexSelect(ByVal Object, ByVal sItem) Dim sAllItems, oRegExp, oMatches sAllItems = Object.GetROProperty("all items") Set oRegExp = New RegExp oRegExp.IgnoreCase = True oRegExp.Pattern = ";" & sItem & ";" Set oMatches = oRegExp.Execute(sAllItems) If Not oMatches.Count > 0 Then oRegExp.Pattern = ";" & sItem Set oMatches = oRegExp.Execute(sAllItems) End If If Not oMatches.Count > 0 Then oRegExp.Pattern = sItem & ";" Set oMatches = oRegExp.Execute(sAllItems) End If If oMatches.Count > 0 Then sMatch = oMatches(0) sMatch = Replace(Mid(sMatch, InStrRev(sMatch, ";", Len(sMatch) - 1), Len(sMatch)), ";", "") Object.Select "" & sMatch End If End Function RegisterUserFunc "WebList", "RegexSelect", "RegexSelect"Once the above is done, next, you can use the following code in your test:
Browser("blah").Page("blah").WebList("blah").RegexSelect C & ".*"Hi Ashoo
I have problem selecting from a Weblist.
ex: My Database Contains “Green”, “Blue”, “Orange”, and “White” and My Weblist contains “Green (123)”, “Blue (321)”, “Orange (-)”, and White (2345).
C = DataTable.Value(“COLOR”, “Action1 [Dbscript]“) ‘C = “Green”
I store the Green value in C variable
The problem is Green is not part of the Weblist, How will I select Green (123)?
note: the number after Green may change in every execution.
Respectfully Yours,
Marco
Sorry for the mispelled Anshoo.
Hi Marco,
Please see if this comment helps you resolve this issue: http://relevantcodes.com/descriptive-programming-dp-concepts-2-regular-expressions/#comment-1898
If not, please use the comments section of this post for your reply and we’ll try to find an alternate solution.
I have a problem with ComboBox. Whenever I run the QTP script CombBox wil select the first value in the list before selecting the actual value I want, but then each value in the combBox has a sub value. The problem I am having is that when is select the first value in the CombBox, the sub value will be stuck in there and will not change the list to the values I selected.
For example:
First value in the list is combo1 selected and its sub value in a different combobox is 1, 2, 3, 4
Second value in the list is selected combo2 and the sub value in a different combobox is 5,6,7,8
Having said when QTP is running it will select the first one then it will select the second (which is I want) but then the sub value is stuck under 1.,2,3,4 instead actually going to the values 5,6,7,8 once QTP select the second value.
Hopefully, you understand the situation.
Thanks
Puneet
Puneet,
What is the code that you’re currently using for this scenario? I guess we can make it quite generic to fit your requirement.
How can I get each value verified in the WbfGrid?
Thanks
Hi Puneet,
I have not had a chance to work with the WbfGrid object, so can’t help you there :(
Based on the previous question how can I make the innertext wildcard right now in the OR the innertext is set to a specific SSN.
It depends, actually. If the SSN are stored inside a WebTable, then you would not need to use OR at all, as it can be done very easily through DP and VBScript. Can you e-mail me the HTML source of the page you’re working on to
anshoo [dot] arora @ relevantcodes.comwithout spaces. I can take a look at it for you and suggest a few snippets that you can use in your testing.Hi Anshoo,
Below is a script where I have taken the SSN_Verify and stored in the external file and now i am taking the GetROProperty from the innertext below and adding it to the ActualResult which works fine, but I cannot seem to figure is how I can go through the mutliple lines to verify the actual ssn have been imported through the system. I have mutlple ssn in the webpage so I want to go through each line and verify the SSN based on the SSN_Verify .
Datatable.Import(“C:\Temp\Data.xls”)
DataTable(“ActualResult”, dtLocalSheet) = Browser(“HA :: Web Portal_3″).Page(“HA :: Web Portal”).WebElement(“First Name”).GetROProperty(“innertext”)
ActualResult = Datatable(“ActualResult”, dtLocalSheet)
ActualResult = SSN_Verify
If SSN_Verify = ActualResult Then
Reporter.ReportEvent micPass,”Verify SSN”, “The expected result ” & ActualResult & “is correct”
else
Reporter.ReportEvent micFail,”Verify SSN”,”The expected result ” & ActualResult & “is incorrect”
End If
Datatable.Export(“C:\Temp\Data.xls”)
Thanks
Puneet
Puneet,
Is the data that you are trying to retrieve from your application inside a WebTable? If that is the case, you can traverse through the cells where the data is stored and use the
.GetCellDatamethod to retrieve it each time your loop increments.Hi Anshoo,
I am trying to get the checkpoint to recgonize the different username when a new is added. The message will indicated the following: “The user ‘provider33′ has been successfully added.’
SwfWindow(“HA – You are currently”).SwfWindow(“Add User”).Dialog(“ePDHA – [Acknowledgement]“).Activate
SwfWindow(“HA – You are currently”).SwfWindow(“Add User”).Dialog(“HA – [Acknowledgement]“).Static(“The user ‘provider2′ has”).Check CheckPoint(“The user ‘provider.*’ has been successfully added.”)
SwfWindow(“HA – You are currently”).SwfWindow(“Add User”).Dialog(“ePDHA – [Acknowledgement]“).WinButton(“OK”).Click
Hi Puneet,
You will have to modify the CheckPoint properties to be able to insert the regular expression. Adding a regular expression to the description of the CheckPoint will not suffice here.
Thanks for the solution Anshoo. Admire your determination.
- QTP User
Most welcome. I have created another version of this function and will publish it in the coming few weeks citing your original comment there :)
Hi Anshoo,
Appreciate your quick response. Thats how I did aswell since I couldn’t use regex. My list had 1000′s of items. Performance is poor when I did something like this… splitting into array and looping thru’ the array. I was looking forward to use inbuilt functions to increase the performance. Could you suggest me an alternative approach.
Thanks much
QTP User
It is definitely possible through RegExp. I am going to try it and post the solution soon.
There you go:
Public Function RegexSelect(ByVal Object, ByVal sItem) Dim sAllItems, oRegExp, oMatches sAllItems = Object.GetROProperty("all items") Set oRegExp = New RegExp oRegExp.IgnoreCase = True oRegExp.Pattern = ";" & sItem & ";" Set oMatches = oRegExp.Execute(sAllItems) If Not oMatches.Count > 0 Then oRegExp.Pattern = ";" & sItem Set oMatches = oRegExp.Execute(sAllItems) End If If Not oMatches.Count > 0 Then oRegExp.Pattern = sItem & ";" Set oMatches = oRegExp.Execute(sAllItems) End If If oMatches.Count > 0 Then sMatch = oMatches(0) sMatch = Replace(Mid(sMatch, InStrRev(sMatch, ";", Len(sMatch) - 1), Len(sMatch)), ";", "") Object.Select "" & sMatch End If End FunctionIf you have the following values:
Green
Blue
Orange
White
and you would like to select Green, the code would be any of following four statements:
Hi Anshoo,
I came across this site while looking for using a regex for a Select property of Weblist. Its wonderful. Hoping you could give me a solution to my issue.
ex: weblist is populated with “green”, “blue”, “orange”, “white” etc. My select should work something similar to “gre.*”. Is it possible?
Browser (“blah”).Page(“blah”).weblist(“blah”).Select (regex)
I tried different ways to be able to use a regex for the select property. More than assigning the value to the weblist, the challenge was to get the selection visible. Would be greatly appreciated if you could provide a solution to this.
Thanks in advance,
QTPUser
Sure is possible, my friend.
Public Function RegexSelect(ByVal Object, ByVal sItem) Dim sAllItems, arrAllItems, ix RegexSelect = False sAllItems = Object.GetROProperty("all items") arrAllItems = Split(sAllItems, ";") For ix = LBound(arrAllItems) To UBound(arrAllItems) If InStr(1, LCase(arrAllItems(ix)), LCase(sItem)) > 0 Then Object.Select arrAllItems(ix) RegexSelect = True : Exit Function End If Next End Function RegisterUserFunc "WebList", "RegexSelect", "RegexSelect"If you have the following values:
Green
Blue
Orange
White
and you would like to select Green, the code would be any of following four statements:
I hope this helps.
Hi Anshoo
2 things i wish to clarify from you.
1.In the above function Not sure why ” If Not oMatches.Count > 0 Then” is seen thrice in above code
2.Purpose of using Execute
3.In the function RegexSelect(ByVal Object, ByVal sItem)
you have 2 arguments but while calling it is seen as RegisterUserFunc “WebList”, “RegexSelect”, “RegexSelect”
Other one
For this statement Browser(“title:=Welcome: Mercury Tours”).Page(“title:=Welcome: Mercury Tours”).Image(“file name:=banner2.gif”).Click
you have adopted the below regex style characters.I went through Regular-Expressions.Info.
As per the site,\W+ will match ateleast 1 alpanumeric
\d+ will match atleast 1 digit
But in the above statement there is no aplhanumeric character in Welcome and no digit is present,but you have used them..any reason ?
Browser(“title:=\w+\D+\w+ours”).Page(“title:=\w+\D+\w+ours”).Image(“file name:=b\w+2\….”).Highlight
Browser(“title:=\w+\D+\w+ours”).Page(“title:=\w+\D+\w+ours”).Image(“file name:=b\w+2\.gif”).Highlight
Browser(“title:=\w+\D+\w+ours”).Page(“title:=\w+\D+\w+ours”).Image(“file name:=.\w+2\….”).Highlight
I have gone through a couple of articles so far and they is extremely of high class.Great work!!!
QTP Community owes you a lot.
thanks Anshoo!!!!!!!!
Do I need to write the same “form: \D+” in the Regular expressions of the property value in the Object Repository ?
Anshoo can you please explain me how it works in the code i am not able to get how it works!!
Yes. Also, remember the check the CheckBox which says: “regular expression”.
Anshoo,
The thing is that I cant try these methods as my text box is at the SAPGrid. As far as I know the only option is SetCellData. Do we have any other solution?
Thanks,
Sivaram S
or else you can try converting the value in the datatable to number or string before giving the same as input to the SAP session.
converting into string or number
Hi Uday,
Thanks for your input.
As you said, I tried SetFocus also. The problem here is that the text box in SAPGuiGrid accepts the data from my datatable and it is visible in the application but the application couldn’t recognize it as the input. There is no errors in coding. In fact, my exact code is…
SAPGuiSession( ).SAPGuiWindow( ).SAPGuiGrid( ).SetCellData 1, “Selection Value”, DataTable(“Broker_Report, dtLocalSheet)
I hard coded test data directly, even variables and data table. I couldn’t automate this. This is something “peculiar”. If you guys know any other alternative methods (except SetCellData) to solve this, I would be much happier.
Thanks,
Sivaram S
Soon after u set the value the next step u do there is?
press Enter button or click some button right …please provide what is to be done…
Thanks Sivaram,
And also can you people tell me “If there are openings on QTP, working experience on QTP is 1yr and overall experience is 2 yrs with 4 months od development experience too.
Thanks you,
{ 3 trackbacks }