# Script Source not matching executed code

**URL:** <https://forum.katalon.com/t/script-source-not-matching-executed-code/35752>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [November 4, 2019, 2:01pm UTC](https://forum.katalon.com/t/script-source-not-matching-executed-code/35752 "2019-11-04T14:01:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco.sala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marco.sala/32/10229_2.png) [@marco.sala](https://forum.katalon.com/u/marco.sala)\
**Post date:** [November 4, 2019, 2:01pm UTC](https://forum.katalon.com/t/script-source-not-matching-executed-code/35752/1 "2019-11-04T14:01:28Z")

</div>

I encounter a very strange behaviour in one test case:

History (done with katalon 6.3.x)

1. creation of a new test case
2. run & test it → all good
3. enhanced the test case using the katalon web recorder
4. new commands have been added to the bottom of the existing test case
5. I manually copied the commands needed into the right place of the test case and deleted all non needed steps
6. run & test it → all good

since upgrade to katalon 7  
7. i run the test case → all good BUT  
8. it executes the old manually deleted steps EVEN that they are not present in the test case editor!

Any similar issue is known?

How can I force Katalon to REBUILD complete workspace?

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [November 4, 2019, 2:17pm UTC](https://forum.katalon.com/t/script-source-not-matching-executed-code/35752/2 "2019-11-04T14:17:42Z")

</div>

Try these steps:

Refresh your Test Cases, Object Repository and Keywords (you can refresh everything if you wish) .The try your test again.

 ![image](https://europe1.discourse-cdn.com/katalon/original/2X/d/d966f729bdecc0ff8d101c40d6402944b95ebaf6.png)

If that fails then do these steps:

1. Close Katalon and uncheck “Auto restore…”

2. Go to your project folder and delete these **highlighted files** 

3. Open Katalon

4. Open your project

5. Test again

---

<div class="post-metadata">

**Author:** ![marco.sala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/marco.sala/32/10229_2.png) [@marco.sala](https://forum.katalon.com/u/marco.sala)\
**Post date:** [November 4, 2019, 3:37pm UTC](https://forum.katalon.com/t/script-source-not-matching-executed-code/35752/3 "2019-11-04T15:37:51Z")

</div>

Short: the issue is solved

and here how I did it:

First I followed your recommendation to refresh my local workspace -\> it did not solve the issue

2nd I deleted all folders you mentioned and rerun it -\> it did not solve the issue

then I re-run again and when in the console log the misterious steps were displayed I doubleclicked on such a script row -\> editor was opened with the “wrong” source. I deleted then all wrong / not needed commands and save the script

close Katalon and restarted it - rerun the test suite -\> all tests passed - no more issues

Sounds crazy - yes - it kept me busy all day but now its fine.

Thanks for the fast support!

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [November 4, 2019, 3:49pm UTC](https://forum.katalon.com/t/script-source-not-matching-executed-code/35752/4 "2019-11-04T15:49:25Z")

</div>


