The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

Pages: 1
Eugene_A
Newbie


Reged: 11/16/11
Posts: 5
Editing cell data in the Farpoint grid?
      #713917 - 08/07/12 04:44 AM

Hi guys. I am automating a .NET application using QTP 11, the application itself uses both Farpoint and Infragistics grids, but it is the former one I have issues with.

I would like to reliably edit the cell data in the grid, but the methods I try do nothing:

Set oCDSGrid = SwfWindow("Appname").SwfWindow("Window").SwfObject("grid")

oCDSGrid.Object.ActiveSheet.SetText 0, 4, "text"
oCDSGrid.Object.ActiveSheet.SetValue 0, 4, "text"

Both these methods display no errors during the test run, but change no value in the grid. It is visible and readable via"
MsgBox oCDSGrid.Object.ActiveSheet.GetText(0, 4)

The add-ins enabled are: .NET and Web (also tried with ActiveX on as Tarun suggested in an other thread)

Do you have any thoughts?

--------------------
Nobody knows where you are
How near or how far...


Post Extras: Print Post   Remind Me!   Notify Moderator  
like2learn
Member


Reged: 06/25/10
Posts: 196
Re: Editing cell data in the Farpoint grid? [Re: Eugene_A]
      #713921 - 08/07/12 05:09 AM

Try this....

oCDSGrid.Object.ActiveSheet.(Click or dblclick) on particular cell 'this will set cursor
oCDSGrid.Object.ActiveSheet.SetText 0, 4, "text"
oCDSGrid.Object.ActiveSheet.click on particular next cell

--------------------
Venu
Today is always better than Tomorrow
My Blog
My LinkedIn


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugene_A
Newbie


Reged: 11/16/11
Posts: 5
Re: Editing cell data in the Farpoint grid? [Re: like2learn]
      #713926 - 08/07/12 06:11 AM

As far as I can see, neither Click, nor DblClick are methods of oCDSGrid.Object.ActiveSheet object.

I can call oCDSGrid Click and DblClick methods, but they require analogue coordinates (X, Y), which is something I try to avoid at all costs; besides I will also need to calculate the coords of the certain cell I want to edit.

Isn't there any really working native editing methods?..

--------------------
Nobody knows where you are
How near or how far...


Post Extras: Print Post   Remind Me!   Notify Moderator  
BharanitharanR
Newbie


Reged: 11/02/10
Posts: 3
Re: Editing cell data in the Farpoint grid? [Re: Eugene_A]
      #713990 - 08/07/12 10:59 PM

Hi,
Try this..
I hope it will work

oCDSGrid.Object.Select Row, Col
oCDSGrid.FireEvent "Click"

Then enter text in to text field

Bharani

Edited by BharanitharanR (08/07/12 11:00 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugene_A
Newbie


Reged: 11/16/11
Posts: 5
Re: Editing cell data in the Farpoint grid? [Re: Eugene_A]
      #714040 - 08/08/12 05:56 AM

This is close to the solution I ended up with:

Set oCDSWindow = (oCDSGrid parent)

oCDSWindow.SwfObject("grid").Object.ActiveSheet.SetActiveCell x, y
oCDSWindow.Type strCellValue
oCDSWindow.Type micReturn
oCDSWindow.Type micTab

--------------------
Nobody knows where you are
How near or how far...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rajkumar_RajangamModerator
Veteran


Reged: 10/22/10
Posts: 3136
Loc: Norway
Re: Editing cell data in the Farpoint grid? [Re: Eugene_A]
      #714044 - 08/08/12 06:18 AM

Try this.

Object.ActiveSheet.Cells.Item(x, y).Text = strCellValue

Refer the documentation here.

--------------------
Rajkumar


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugene_A
Newbie


Reged: 11/16/11
Posts: 5
Re: Editing cell data in the Farpoint grid? [Re: Rajkumar_Rajangam]
      #714046 - 08/08/12 06:24 AM

Quote:

Try this.

Object.ActiveSheet.Cells.Item(x, y).Text = strCellValue

Refer the documentation here.




This method throws an error:

General run error.
Line (2): oCDSGrid.Object.ActiveSheet.Cells.Item(0, 4).Text = "Test".

--------------------
Nobody knows where you are
How near or how far...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Rajkumar_RajangamModerator
Veteran


Reged: 10/22/10
Posts: 3136
Loc: Norway
Re: Editing cell data in the Farpoint grid? [Re: Eugene_A]
      #714048 - 08/08/12 06:27 AM

Try a different row index.

--------------------
Rajkumar


Post Extras: Print Post   Remind Me!   Notify Moderator  
Eugene_A
Newbie


Reged: 11/16/11
Posts: 5
Re: Editing cell data in the Farpoint grid? [Re: Rajkumar_Rajangam]
      #714052 - 08/08/12 06:54 AM

The error is gone, but the new value is not set. The test runs now with no visible result.

I also tried turning on the edit mode for the cell, but it did not help.

--------------------
Nobody knows where you are
How near or how far...


Post Extras: Print Post   Remind Me!   Notify Moderator  
sweetguy
Newbie


Reged: 11/29/12
Posts: 1
Re: Editing cell data in the Farpoint grid? [Re: Eugene_A]
      #719936 - 11/29/12 08:41 PM

Hi,
I am also automating application having FarPoint grid and also facing the same problem. No value is saved.
So can u plz tell me if u find the solution or alternative for this issue?


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 65 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 4897

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5