cancel
Showing results for 
Search instead for 
Did you mean: 

HScroll not working in KWTest

SOLVED
Frequent Contributor

HScroll not working in KWTest

Hi Everyone!

 

I'm struggling to get a Horizontal Scroll to to set position using the HScroll object in a keyword test. All the others work in the test except one. The only difference is the position of the HScroll, nothing else is different from this one to the ones that work. The step DOES work when I run it on it's own but not at test run time.

 

Things I've tried:

      - Copying an HScroll step that is working and changed the position

      - Recreating a brand new operation

      - Confirmed the steps is looking at the correct object

      - Slowing the test down by adding Delays before this HScroll step

      - Putting an If Object Exists before the HScroll Object

 

As you can see I've tried quite a few things to get it working but am running low on ideas and patience! Smiley Happy

 

Any tips?

 

Thanks!

Jenny

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: HScroll not working in KWTest

When you say "doesn't work", are there errors in your log or any other messages that indicate what might be going on?

 

You seem to have gone through all the basic trial/error stuff I would have suggested.  One thing to think about... is the HScroll on screen when you run the test full speed?  I've seen somethings happen, sometimes, where if a component is not on screen, while it may LOOK like everything is working, it doesn't really work right because you can't interact with it.  

 

Since this is a desktop application, see if there's some sort of VScroll or Page Down that you might be able to do to get the component on screen before you attempt to work with it.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available

View solution in original post

5 REPLIES 5
Community Hero

Re: HScroll not working in KWTest

When you say "doesn't work", are there errors in your log or any other messages that indicate what might be going on?

 

You seem to have gone through all the basic trial/error stuff I would have suggested.  One thing to think about... is the HScroll on screen when you run the test full speed?  I've seen somethings happen, sometimes, where if a component is not on screen, while it may LOOK like everything is working, it doesn't really work right because you can't interact with it.  

 

Since this is a desktop application, see if there's some sort of VScroll or Page Down that you might be able to do to get the component on screen before you attempt to work with it.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available

View solution in original post

Community Hero

Re: HScroll not working in KWTest

Try putting a breakpoint in somewhere above the scroll so the test stops and then step through the test a line at a time.  Sometimes you can see things happen this way that aren't obvious when the test runs on its own.

Frequent Contributor

Re: HScroll not working in KWTest

Hi Robert!

 

Thanks!

 

Sorry, that was a bit vague of me. Smiley Sad When I ran the test at full speed it did not move the scroll bar and it remained in the same position as it was previously to that step. So the subsequent image checkpoint was failing.

 

I found I could get it to work if I inserted a Click on the object before I tried to interact with it. It seems a bit silly to have to do that but it makes sense, if, like you say, it isn't available to interact with yet. By clicking on it I suppose it makes it available. Though, why doesn't the HScroll behave the same way? Anyway, that's besides the point. I just don't like unneccessary test steps. Smiley Happy

 

Thanks again, all working now and I'll keep that in mind in future!

Frequent Contributor

Re: HScroll not working in KWTest

Thanks Marsha!

 

I need a bit more practise with using breakpoints, stepping through, over etc... Up until now I've only used Stop executions as I feel like I've got more control over the test. I also found that with the mouse disabled during test runs, if I pause or the test pauses because on a breakpoint, I cannot use the mouse. Therefore, I've continued to use Stops and not breakpoints as I don't want to have the mouse enabled when tests run.

 

I presume this is how it is designed and most users do not disable the mouse and therefore do not see this issue?

Community Hero

Re: HScroll not working in KWTest

The breakpoints and other debug features are very useful.  Stopping the test loses the state of everything and you can't see what happened.  If you pause at a breakpoint and then proceed through the code, you may find that the test is not doing exactly what you intended.  Watching it at regular speed can hide this.  

 

I've never had occasion to disable the mouse.  Usually the tests are running on a machine on my desk or on a vm and nothing interferes.  If I need to test on a public machine somewhere, then I just make a quick sign to please don't disturb this and lay it over the keyboard and mouse.