# Upgraded to 7.3.1 and get a NPE

**URL:** <https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [May 2, 2020, 1:42am UTC](https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977 "2020-05-02T01:42:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssridharan](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@ssridharan](https://forum.katalon.com/u/ssridharan)\
**Post date:** [May 2, 2020, 1:42am UTC](https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977/1 "2020-05-02T01:42:37Z")

</div>

After upgrading to 7.3.1, I am getting null pointer exception and my tests fail.  
In my tests, i call some methods where i use native selenium commands.  
So, at the start of each method i get the driver and end of the method I change it back, so i can continue using katalon commands in the actual test case…some thing like this:

public static void usingSeleniumMethods(){  
WebDriver driver = DriverFactory.getWebDriver()  
.  
.  
(some function to perform)  
.  
.  
.

DriverFactory.changeWebDriver(driver)

}

This worked fine before, but after the katalon upgrade (also had to upgrade chrome driver for 7.3.1), i get java.lang.NullPointerException  
Disabling the above driver switch in method made it work, but gave a java.lang.NullPointerException at the end of test case.

Does we still need to follow below link for switching between katalon and selenium?  
[https://docs.katalon.com/katalon-studio/docs/using\_selenium\_webdriver\_katalon\_studio.html#driverfactory](https://docs.katalon.com/katalon-studio/docs/using_selenium_webdriver_katalon_studio.html#driverfactory)

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

---

<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:** [May 2, 2020, 8:59am UTC](https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977/2 "2020-05-02T08:59:24Z")

</div>

Assigned @ThanhTo on May 2, 2020, 8:59am UTC



---

<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:** [May 2, 2020, 12:32pm UTC](https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977/3 "2020-05-02T12:32:45Z")

</div>

> [@ssridharan](#):
>
> So, at the start of each method i get the driver and end of the method **I change it back** ,

What if you get the driver but you do **NOT** change it back?

---

<div class="post-metadata">

**Author:** ![ssridharan](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@ssridharan](https://forum.katalon.com/u/ssridharan)\
**Post date:** [May 2, 2020, 3:18pm UTC](https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977/4 "2020-05-02T15:18:04Z")

</div>

When I don’t change it back, all steps passes but gave a java.lang.NullPointerException at the end of test case

---

<div class="post-metadata">

**Author:** ![ssridharan](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@ssridharan](https://forum.katalon.com/u/ssridharan)\
**Post date:** [May 3, 2020, 10:59pm UTC](https://forum.katalon.com/t/upgraded-to-7-3-1-and-get-a-npe/42977/5 "2020-05-03T22:59:54Z")

</div>

Temporary solution, i am able to get by for now by NOT change driver back. But I still cannot execute katalon commands once I am back on my test case. So, we probably need a fix or some workaround as long term solution

Thanks!
