Micro Focus QTP (UFT) Forums
Unable to identify .net addin objects - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Unable to identify .net addin objects (/Thread-Unable-to-identify-net-addin-objects)



Unable to identify .net addin objects - sivashankar_d - 06-03-2009

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??


RE: Unable to identify .net addin objects - abrakh - 06-05-2009

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



RE: Unable to identify .net addin objects - sivashankar_d - 06-12-2009

I am testing it for .net Windows forms. I have added calendar control to the repository,Still it doesn't set Date.


RE: Unable to identify .net addin objects - sivashankar_d - 06-15-2009

(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.


RE: Unable to identify .net addin objects - v_selvam - 11-18-2009

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.


RE: Unable to identify .net addin objects - vinod123 - 11-15-2011

where can i get value of k