New scripts corrupting the existing (working/good) ones.

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
SangeetaSDAF
Posts: 2
Joined: Wed Apr 05, 2017 2:42 am

New scripts corrupting the existing (working/good) ones.

Post by SangeetaSDAF » Wed Apr 05, 2017 5:30 am

Issue: New scripts corrupting the existing (working/good) ones.

Application: Web (IE Browser) based

Details explained in the below steps:

1. User recorded a test script which involved selection being made from a DROP-DOWN(HTML element: <Select> <Option>) menu.
2. This was successfully recorded and played back.
3. User tried a different form in the same application, again involving some other DROP-DOWN menu, recording was successful.
4. Playback for the Step 3 failed and it also corrupted the Test Script developed in Step 1! A repository item is deleted, and causes build errors (see screen shots below).



It was fixed using the below method, however we are not comfortable knowing the fact that the newly generated scripts can corrupt the previous existing ones!

1. Changed the <attribute TagValue> variable from 0 to 1 (which was the list item number for the drop-down option selected.) in the Script developed in Step no. 3 above. This helped resolved the playback of Test script developed in Step 3.
2. Re-captured the script developed in Step 1 and record - playback was good now!

Thanks,
Sangeeta
Attachments
Ranorex-Query1.jpg
Step 4 - dropdown item not found
Ranorex-Query1.jpg (120.96 KiB) Viewed 690 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3944
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: New scripts corrupting the existing (working/good) ones.

Post by odklizec » Wed Apr 05, 2017 12:27 pm

Hi,

Unfortunately, without seeing your AUT and examining problematic recording, there is not much anyone here can do or suggest. Also, you forgot to mention Ranorex version in which you experiencing this problem?

Anyway, if I may suggest something, you should split your somewhat long recording into multiple smaller recordings. You see, the longer the recording is, the least reusable it is and it's prone to failures.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

SangeetaSDAF
Posts: 2
Joined: Wed Apr 05, 2017 2:42 am

Re: New scripts corrupting the existing (working/good) ones.

Post by SangeetaSDAF » Tue Apr 11, 2017 4:56 am

Thanks for the reply.

As requested, I am attaching the screenshots (max 3 allowed here on the forum) of the steps with some more details, as well as the workaround that we came up with. It is a pretty tedious workaround though and hence we still need a proper solution to the issue.

We are using Ranorex version 7.0.0

RECORDING TEST SCRIPT 1:

Step 1. User recorded a Test script No. 1 which involved selection being made from a DROP-DOWN(HTML element: <Select> <Option>) menu.

METHOD OF RECORDING USED BY RANOREX: ACTION = MOUSE, CLICK
HTML EVENT USED BY THE APPLICATION: ‘Onchange’

<select name="complexGrid.cmpxAttr(0)" style="background-color: white;" onchange="attributeChanged('','0');if (typeof complexGridRefresh === 'function') complexGridRefresh();"><option style="width: 100%; background-color: white;" selected="selected" value=""></option>

PLAYBACK TEST SCRIPT 1:

Step 2. This was successfully recorded and played back.

RECORDING TEST SCRIPT 2:

Step 3. User tried a different form within the same application, again involving some other DROP-DOWN menu, the recording was successful.

METHOD OF RECORDING USED BY RANOREX: ACTION = SET VALUE, NAME = TagValue, Value = 0
HTML EVENT USED BY THE APPLICATION: Onchange

<select name="calcLineChangeItem[0].detailsClassification.value(calcLineClassification)" class="addCalcLineClassSelect" onchange="classificationChanged(this);"><option value="0"></option>

PLAYBACK RECORDING OF TEST SCRIPT 2:

Step 4. Playback for the Step 3 failed and it also corrupted the Test Script 1 developed in Step 1. A repository item is deleted, and causes build errors (see screen shots below).

PLEASE REFER TO THE STEP 4.JPG ATTACHED
Step4.jpg
Step4.jpg (653.51 KiB) Viewed 653 times
PLEASE REFER TO THE STEP 4a.JPG ATTACHED
Step4a.jpg
Step4a.jpg (508.8 KiB) Viewed 653 times
WORKAROUND FOUND SO FAR IS:

STEP 5. User changed the Recording of Test script 2 by altering the <attribute TagValue> now set as $Newvariable changed from 0 to 1 (which was the list item number for the drop-down option selected.). This helped resolved the playback of Test script No. 2.

RANOREX RECORDING: ACTION = Set Value, NAME = TagValue, VALUE = 0 changed to 1

PLEASE REFER TO THE STEP 5a.JPG ATTACHED
Step5a-WorkAround.jpg
Step5a-WorkAround.jpg (367.71 KiB) Viewed 653 times
PLAYBACK RECORDING OF TEST SCRIPT 2:

STEP 6. The below prompt came on the screen and upon clicking on OK, the script failed to run with the following errors:

<Please note that module variables are only bound when replaying them from within a test suite. When replaying a module directly the variable default values are used.>
-This solution as build errors.
-Error - Action # The repository item cannot be found.

STEP 7: User deleted the Test Script No. 1 from the project module and re-ran Test Script 2 (Played back, with the fix).

STEP 8: TestScript2 was successfully played back.

STEP 9. User Re-captured the Test script No. 1 again within the same module:

STEP 10. The playback for Test Script 1 was also good now!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: New scripts corrupting the existing (working/good) ones.

Post by Support Team » Fri Apr 14, 2017 1:28 pm

Hello SangeetaSDAF,

Unfortunately we are unable to analyze the issue from the attached screenshots. I suggest getting in touch with us by sending an email to our support inbox to [email protected] (USA) or to [email protected] (Europe and world), so that we can better help you.

Please include a Ranorex Snapshot of the application under test and a compressed Ranorex Solution.

We are looking forward to your email.

Sincerely,
Tomaž
.
Image