Welcome, Guest. Please login or register.
Login with username, password and session length

 
Advanced search

13187 Posts in 3425 Topics- by 21984 Members - Latest Member: kushalava
 

Pages: [1] 2   Go Down
Print
0 Members and 1 Guest are viewing this topic.
Author Topic: devexpress    (Read 4106 times)
sophie daiter
User
*
Offline Offline

Posts: 1


WWW
« on: November 18, 2007, 04:35:45 AM »

hi everybody,

i'm working with application written in .NET #c,
but most of the grids and tabs were built with devexpress or syncfusion
the qtp , is having troubles to identify these objects,
when i use ".net object spy" it recognizes the grid as "swfobject"
and this is really bad because i can't get into the fields and get the information in each row. moreover the information which is being displayed in the "gui" doesn't mach exactly  the real tables in the datasource so i even don't know what is the real index of the item that i want to refer to.

is there any solution in qtp to this problem, i'm sure i'm not the first one that encountered thid issue.
maybe there is add in, in qtp that supports DevExpress ans SyncFusion objects.

waiting for your answers
thanx Smiley
sophie
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 620



« Reply #1 on: November 18, 2007, 08:15:52 AM »

please see referred response
http://www.advancedqtp.com/forums/index.php?topic=95.0

if you have particular problems with identification on DevExpress
pls contact me.
i can tell you that in these days i am working on a solution for DevExpress objects
i am writing a section of tips, to work with most of DevExpress objects.
it will be published soon.


DevExpress.ComboBoxEdit Sample
Code
GeSHi (qtp):
SwfWindow("W").Activate

Set comboBoxEdit = SwfWindow("W").SwfObject("comboBoxEdit").Object

comboBoxEdit.Focus

Set items = comboBoxEdit.Properties.Items

nIndex = items.IndexOf( "Nissan" )

If comboBoxEdit.SelectedIndex <> nIndex Then

   comboBoxEdit.SelectedIndex = nIndex

End If
Created by GeSHI 1.0.7.20
« Last Edit: November 18, 2007, 01:59:35 PM by Dani Vainstein » Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Gareth Beynon
User
*
Offline Offline

Posts: 11


« Reply #2 on: November 20, 2007, 06:17:13 PM »

I've got a similar problem. I've followed the .Net custom controls guide and found the property in the child object I want to retrieve (which is great) but what I really want to know is a syntax or method I can use to manipulate and input directly into that same object.

For me when I use the .net spy on the Devexpress VerticalGrid object I can drill down the child MultiEditorRow with this:

Code
GeSHi (qtp):
sValue = SwfWindow("<window>").SwfWindow("<window>").SwfObject("SwfObject").object.visiblerows.item(3).propertiescollection.item(0).value
Created by GeSHI 1.0.7.20

Returning the value I would need to check. If I then change the value through the spy it updates the AUT accordingly but I just need to know how to do that through code.

I've tried a couple of syntax options but all of them either return a general run error or the "no such method or property" error on execution.

This is of course Devexpress again, the prototype application I am working with it littered with them so any help/advice you could give towards supporting them robustly would be greatly appreciated.

Thanks.
« Last Edit: November 20, 2007, 06:23:02 PM by Gareth Beynon » Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 620



« Reply #3 on: November 21, 2007, 01:28:16 AM »

Hi

you tryed?
Code
GeSHi (qtp):
SwfWindow("<window>").SwfWindow("<window>").SwfObject("SwfObject").object.visiblerows.item(3).propertiescollection.item(0).value = newValue

 
Created by GeSHI 1.0.7.20
do you talk about DevExpress.XtraGrids.VerticalGrid?
send me the class name, maybe i can give something fast.
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Gareth Beynon
User
*
Offline Offline

Posts: 11


« Reply #4 on: November 21, 2007, 03:39:33 PM »

Hi Dani,

Thanks for the reply, yes its a DevExpress.XtraGrids.VerticalGrid.

I've tried that syntax you posted already and it gives the "General run error" message in QTP. To give a bit of background the application uses these grids to display input fields but it appears its just a dummy grid and the actual input objects only become available to view once you focus on a particular field. At that point the input object (of type CalcEdit, LookUpEdit etc...) appears in the .controls collection of the grid with a specific boundary/location.

« Last Edit: November 21, 2007, 04:22:55 PM by Gareth Beynon » Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 620



« Reply #5 on: November 22, 2007, 08:20:22 AM »

i will mekae a reserch , and wil try to help you
it maybe would take a couple of days
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Gareth Beynon
User
*
Offline Offline

Posts: 11


« Reply #6 on: November 26, 2007, 03:48:34 PM »

Dani,

Any news on this? I've kind of stopped making any headway myself so any feedback you have is greatly appreciated.
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 620



« Reply #7 on: November 27, 2007, 12:46:27 PM »

hi sophie

i've made my reserch...
no good news

something was very wierd i.e
SwfWindow("W").SwfObject("VerticalGrid").Object.Rows.Item(0).Expanded
returned False
so, the next line was
SwfWindow("W").SwfObject("VerticalGrid").Object.Rows.Item(0).Expanded = True
and i got a general error.
i tryed via Reflection.Assembly, no success.
the last thing you can do is to write your own dll in C# ( Dot.Net extensibility )
sorry
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Daniel Portmann
User
*
Offline Offline

Posts: 18


« Reply #8 on: January 20, 2008, 02:41:02 PM »

Hi all,
I'm having exactly the same problem using the .Object notation with .net controls.
We are using Infragistigs, but we don't want to buy the additional addin.
(If I buy a villa (=Mercury/HP), I like to have the swimming pool (=Infragistics) inclusive!!!).
And there are two things which are not working:
- The provided function(s) don't add a report entry to the qtp result => Difficult run analyzing
- The UltraTabControl does not record any actions on a tab control.

1. I tried the XML extension, but with that the ReplayReportStep method hangs up, when I use descriptive programming (using the object repository works)!! And I can't get a return value from the called .net function/method back to QTP.

2. I tried the .Object notation, but I can't SET a runtime property. GETTING the value from the properties works allways.
It seems that it’s not possible to set a property inside an item/collection (tested with normal windows form).
I can only set runtime properties that are directly under the testobject where I use the .Object notation.

Here an example/solution with a Panels object:
Set oPanels=test_obj.Object.Controls
oPanels.Item(1).Collapsed=False => ERROR!
... Workaround...
sHandle=oPanels.Item(1).Handle
Set oItem=test_obj.SwfObject("hwnd:="+sHandle).Object
oItem.Collapsed=False => WORKS FINE!
I opened a case at HP but they could not help me...  Angry

3. So the last chance is using DLL's. I already had success to build my "Hello world" assembliy.
And I found out the way to get a string or string array back to QTP (at every place where void is used in the demo-project you can define a return value).
Now I have one question: Is it possible to build one single assembly to put in all methods from all used controls together in one DLL???
If yes-how?

Thanks in advance!
Daniel
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 620



« Reply #9 on: January 21, 2008, 01:37:47 AM »

Hi dan

First i want to give you two resources where maybe your questions will be answered
1. The StringUtil Project
http://www.advancedqtp.com/knowladge-base/projects/stringutil/
if you have Visual Studio you might learn a lot, how to manipulate .NET data types.
2. chapter of Scripting QTP book
http://www.advancedqtp.com/knowladge-base/scripting-quicktest-professional/dotnetfactory/
Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Daniel Portmann
User
*
Offline Offline

Posts: 18


« Reply #10 on: January 22, 2008, 02:32:02 PM »

Hi Dani,

Thanks for your hints!
I now found out that all methods that I need I can post in a single CustomServer assembly. The SwfConfig.xml differents only in the ControlType, the other settings are always the same.

Daniel
Logged
Dani Vainstein
Administrator
Advanced User
*****
Offline Offline

Posts: 620



« Reply #11 on: January 22, 2008, 02:40:40 PM »

Hi Daniel

Very interesting the workaround you supplied with the Handle.
i want to test it on DevExpress, i will let you know in a few days, since i am very bussy in the FR Project.
since i don't have currently a dot.net addin, i need to find it somewhere...
« Last Edit: January 22, 2008, 02:42:25 PM by Dani Vainstein » Logged

Best Regards,
Dani Vainstein
Mercury CPC

http://www.advancedqtp.com
Rajani
FRProject
Active User
*
Offline Offline

Posts: 91


WWW
« Reply #12 on: January 23, 2008, 03:49:50 PM »

Hi Sophie,

I am using the QTp 9.2 with custome controls being devexpress. I was getting the errors. Can you please let me know how you used the CustomServr Assembly the config file. I did not get that.

Thanks a lot
Logged
Tanya Y
User
*
Offline Offline

Posts: 1

as


WWW
« Reply #13 on: April 01, 2008, 12:22:10 PM »

Hi Daniel

Very interesting the workaround you supplied with the Handle.
i want to test it on DevExpress, i will let you know in a few days, since i am very bussy in the FR Project.
since i don't have currently a dot.net addin, i need to find it somewhere...


hello,
is it work on devexpress, if so, how to implement
thanks
Logged
Manicka
User
*
Offline Offline

Posts: 18


« Reply #14 on: April 21, 2008, 10:43:09 PM »

Hi Sophie,

I am using the QTp 9.2 with custom controls being devexpress. I am not in a position to select the individual Tabs in my application. If you have any solution, please let me know.

Thanks a lot
Manicka.
Logged
Pages: [1] 2   Go Up
Print
Jump to: