Anyone working with Delphi and QARun and figured out a way to work with data in a particular cell of a delphi grid? I'm working mostly with DBGrids.
None of QARun's functions seem to work. I know of a sloppy work around but I'm afraid of what is going to happen on different platforms.
Thanks in advance!
We are using Delphi. From my experiences with grids, I have found little or no "built-in" support for them in most of the automated test tools. I have usually written my own custom functions that take actions against the grids by using keystrokes.
With a DBGrid, you should be able to copy the contents of a cell to the clipboard using keyboard shortcuts like 'Ctrl-C'. This will allow you write a function to check the values in the cell. You should also be able to type into the cells, thus creating a function to enter data.
We use Delphi grids too. I found that it was very helpful to check "TextSelects" on the General tab of the Configure Learn Settings dialog.
I wrote a function that takes the attach name for the grid and the text that I'm looking for in the grid. It attaches to the window and then does a "TextSelect." It has an ON ERROR statement in it in case the text can't be found in the grid. I find that I call this function a lot, when I need to jump to or find a particular value in a grid.
I also found that I could use TextSelect for clicking on the columns of the grid (for sorting the grid).
I have tried hard to avoid using mouse click coordinants myself. There are a few places were I could not help but use them, but they do seem to work. They even work when I run the script on different machines. As far as I know, I don't see a major problem with using them every now and again when there is NO OTHER POSSIBLE WAY to do something.
That is just my opinion.
Just out of curiosity, has anyone out there encountered problems using mousclick coordinants?