# How to fix missing import automatically after imported file is moved

**URL:** <https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [March 17, 2021, 1:16am UTC](https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024 "2021-03-17T01:16:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shunmatsu\_begginer](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/shunmatsu_begginer/32/14838_2.png) [@shunmatsu\_begginer](https://forum.katalon.com/u/shunmatsu_begginer)\
**Post date:** [March 17, 2021, 1:16am UTC](https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024/1 "2021-03-17T01:16:47Z")

</div>

Hi,

There are the Test Case(A) that imports the specific Keyword file(B).  
I’d like to fix missing the imported path of B automatically in A after B is moved to another directory.  
Is there a way to do that?

Best regards.

- example: import util.Sample → import helper.Sample  
 ![import](https://europe1.discourse-cdn.com/katalon/original/3X/3/f/3ff3cd58f408c976a0e9f8efbebc6d24e795a91e.png)

---

<div class="post-metadata">

**Author:** ![kazurayam](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kazurayam/32/333_2.png) [@kazurayam](https://forum.katalon.com/u/kazurayam)\
**Post date:** [March 17, 2021, 3:13am UTC](https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024/2 "2021-03-17T03:13:39Z")

</div>

Unfortunately Katalon Studio has a bug.

Provided that

1. you have `Keywords/util/Sample.groovy`
2. you have `Test Cases/A` which has a line `import util.Sample`

And  
3. you move `Keywords/util/Sample.groovy` to `Keywords/helper/Sample.groovy` by a drag&drop operation in the Test Explorer pane

You will expect  
4. The `Test Cases/A` will be automatically updated: change `import util.Sample` to `import helper.Sample`

But, I know, Katalon Studio 7.9.1 does not do (4). `import util.Sample` stays unchanged.

The only way for you is to edit the `Test Case/A` manually.

* * *

As for code refactoring (renaming files, classes etc), I know Katalon Studio has a lot of shortages.

@duyluong  
@ThanhTo

Team should pay more attention to these fundamentals, I think.

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [March 17, 2021, 4:37am UTC](https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024/3 "2021-03-17T04:37:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![shunmatsu\_begginer](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/shunmatsu_begginer/32/14838_2.png) [@shunmatsu\_begginer](https://forum.katalon.com/u/shunmatsu_begginer)\
**Post date:** [March 17, 2021, 5:09am UTC](https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024/4 "2021-03-17T05:09:19Z")

</div>

Oh, I see.  
I’ll do that manually.  
Thank you for replying.

---

<div class="post-metadata">

**Author:** ![duyluong](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/duyluong/32/1116_2.png) [@duyluong](https://forum.katalon.com/u/duyluong)\
**Post date:** [March 17, 2021, 7:02am UTC](https://forum.katalon.com/t/how-to-fix-missing-import-automatically-after-imported-file-is-moved/53024/5 "2021-03-17T07:02:27Z")

</div>

> But, I know, Katalon Studio 7.9.1 does not do (4). `import util.Sample` stays unchanged.  
> The only way for you is to edit the `Test Case/A` manually.

Hi @kazurayam, @shunmatsu_begginer

Our development team acknowledge this issue and put it in our backlog to resolve in further releases. Thanks for your report
