Can't solve my element error. Need help!

How to apply eValid to functional testing of web applications.

Can't solve my element error. Need help!

Postby mikejr » Tue Aug 16, 2016 9:45 am

Hi there.

I am learning about the DOM conversions.

On one particular screen something doesn't seem to line up.

Using IndexFindElement always fails to find the targeted element.

#Breakpoint "Finding"
#IndexSet 0
#IndexFindElement 0 DOWN "A" "Run" "number:2>>number:3"

ElementMouseDown 0 177 "RunFilterBtnlink" "Run" "number:2>>number:3"
ElementMouseUp 0 177 "RunFilterBtnlink" "Run" "number:2>>number:3"

The ElementMouse* events were captured.

I tried converting to the IndexFindElement and I tried lots of different values based on what I copied from the captured values as well as what I found in the PageMap, but I have not had success.

It always fails to locate the element.

Maybe I've got a really weird screen.

I may try another of the problem screens.

The biggest issue is that I can't recreate the problem at will.

I will occasionally get errors on the script when running in playback, but it usually works on the production machines and it always works when debugging.

When it happens, it tells me that .ERROR: Source index 177 is out of bounds (line 65 of eValid-CiscoCUID.evs).

So it appears that that button is not available..

Everything up to that point and after works fine.

Any insights/suggestions please.
mikejr
 
Posts: 1
Joined: Tue Aug 16, 2016 9:39 am

Re: Can't solve my element error. Need help!

Postby eValid » Wed Aug 17, 2016 2:59 pm

mikejr wrote:Hi there.

I am learning about the DOM conversions.

On one particular screen something doesn't seem to line up.

Using IndexFindElement always fails to find the targeted element.

#Breakpoint "Finding"
#IndexSet 0
#IndexFindElement 0 DOWN "A" "Run" "number:2>>number:3"

ElementMouseDown 0 177 "RunFilterBtnlink" "Run" "number:2>>number:3"
ElementMouseUp 0 177 "RunFilterBtnlink" "Run" "number:2>>number:3"

The ElementMouse* events were captured.

I tried converting to the IndexFindElement and I tried lots of different values based on what I copied from the captured values as well as what I found in the PageMap, but I have not had success.

It always fails to locate the element.

Maybe I've got a really weird screen.

I may try another of the problem screens.

The biggest issue is that I can't recreate the problem at will.

I will occasionally get errors on the script when running in playback, but it usually works on the production machines and it always works when debugging.

When it happens, it tells me that .ERROR: Source index 177 is out of bounds (line 65 of eValid-CiscoCUID.evs).

So it appears that that button is not available..

Everything up to that point and after works fine.

Any insights/suggestions please.


Thanks for posting mikejr.

You seem to have a dynamic page, probably with AJAX inside it and that means that you may have a timing and/or a "page settling" problem.

If the test works intermittently, for sure it will be tracked down to a timing problem.

The message explaining that a source index is out of bounds is probably correct, at the time the command was run, but probably would be found if you waited 100 msec.

We don't recommend adding Wait or Delay statements to overcome this issue you're discussing.

Instead, we recommend setting up a "SyncOnElementProperty" command, after finding (with the eValid PageMap feature) and element property the existence of which guarantees that the page is stable.

Here is a short outline of all of the sync modes available:

http://www.e-valid.com/Products/Documen ... mmary.html

Please contact us if you like a more in-depth support from us.

-- eValid Support
eValid
 
Posts: 2392
Joined: Tue Jan 01, 2008 12:48 pm
Location: USA


Return to Desktop and Mobile Device Functional Testing

Design Downloaded from free phpBB templates | free website templates | Free Web Buttons