Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to identify .net addin objects
#1
Not Solved
QTP 9.5 doesn't detect date picker control for a windows application while recording.I have selected .Net,web and WPF addins. Can anyone let me know how to make qtp identity date picker control??
Reply
#2
Not Solved
Hi I faced similar problem in one of my proj. The workaround was click on the image(calender) wait for 2 secs till it appear and use this function.(ofcourse you need to have your objects in OR)

'*******************
'Select Date on any DMS page
'*******************
Code:
Function SelectDate(k)
k = CDate(k)
k1 = Cstr(MonthName(month( k)))
k2 = CStr (year(k))
k3 = Cstr(day(k))

Browser("DMS").Page("DMSPage").WebList("ddl_Month").Select k1
Browser("DMS").Page("DMSPage").WebList("ddl_Year").Select k2

'*******************
'Function to select the date from Calender table
'********************
Code:
For i = 0 to 1
If Browser("DMS").Page("DMSPage").WebElement("html tag:=FONT","innertext:="&k3,"index:="&i).exist Then
    str1 =  Browser("DMS").Page("DMSPage").WebElement("html tag:=FONT","innertext:="&k3,"index:="&i).getroproperty("outerhtml")
    If instr (str1, "black") or instr (str1, "red") Then
    Browser("DMS").Page("DMSPage").WebElement("html tag:=FONT","innertext:="&k3,"index:="&i).Click
    wait 1
    Exit for
    End If
End If
Next
End Function
Reply
#3
Not Solved
I am testing it for .net Windows forms. I have added calendar control to the repository,Still it doesn't set Date.
Reply
#4
Not Solved
(06-12-2009, 05:40 PM)sivashankar_d Wrote:
(06-05-2009, 03:35 PM)abrakh Wrote: [quote='sivashankar_d' pid='5664' dateline='1244022657']
QTP 9.5 doesn't detect date picker control for a windows application while recording.I have selected .Net,web and WPF addins. Can anyone let me know how to make qtp identity date picker control??

Hi I faced similar problem in one of my proj. The workaround was click on the image(calender) wait for 2 secs till it appear and use this function.(ofcourse you need to have your objects in OR)

'*******************
'Select Date on any DMS page
'*******************
Function SelectDate(k)
k = CDate(k)
k1 = Cstr(MonthName(month( k)))
k2 = CStr (year(k))
k3 = Cstr(day(k))

Browser("DMS").Page("DMSPage").WebList("ddl_Month").Select k1
Browser("DMS").Page("DMSPage").WebList("ddl_Year").Select k2

'*******************
'Function to select the date from Calender table
'********************
For i = 0 to 1
If Browser("DMS").Page("DMSPage").WebElement("html tag:=FONT","innertext:="&k3,"index:="&i).exist Then
str1 = Browser("DMS").Page("DMSPage").WebElement("html tag:=FONT","innertext:="&k3,"index:="&i).getroproperty("outerhtml")
If instr (str1, "black") or instr (str1, "red") Then
Browser("DMS").Page("DMSPage").WebElement("html tag:=FONT","innertext:="&k3,"index:="&i).Click
wait 1
Exit for
End If
End If
Next
End Function


I am testing it for .net Windows forms.I have manually added SwfCalendar to object repository.Tests passes but Date is not set.
Reply
#5
Not Solved
hi
you shoud send the Date object in the set method. To set today's date use the following code

Code:
swfWindow("name").swfDioalog("name").swfCalader("name").Set Date

Or using CDate function, convert string in to 'Date' type data. then set it.
Reply
#6
Not Solved
where can i get value of k
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to recognize objects in SilverLight application through QTP Guest877 1 2,653 08-03-2018, 08:33 AM
Last Post: Manisha
  UFT CAN'T IDENTIFY OBJECTS ORGIO 3 2,381 07-28-2018, 01:25 AM
Last Post: marcelodruida
  UFT unable to identify Java app objects consistently lester 1 2,026 07-12-2018, 08:28 PM
Last Post: Ankur
  How to know UFT Qt-Addin Version suresh bona 1 2,683 08-17-2016, 08:35 PM
Last Post: Ankur
  Unable to Identify Firefox Dialog rsrohit55 0 2,319 05-03-2016, 05:23 PM
Last Post: rsrohit55

Forum Jump:


Users browsing this thread: 3 Guest(s)