# Driver overwriting driver

**URL:** <https://discuss.appium.io/t/driver-overwriting-driver/34304>\
**Category:** Support\
**Created:** [July 29, 2021, 1:19pm UTC](https://discuss.appium.io/t/driver-overwriting-driver/34304 "2021-07-29T13:19:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkezn780](https://discuss.appium.io/user_avatar/discuss.appium.io/tkezn780/32/8568_2.png) [@tkezn780](https://discuss.appium.io/u/tkezn780)\
**Post date:** [July 29, 2021, 1:19pm UTC](https://discuss.appium.io/t/driver-overwriting-driver/34304/1 "2021-07-29T13:19:42Z")

</div>

I use Driver three times in my code in the program where all my tests run I use protected IOSDriver \_IOSdriver;  
in my sitemodel I use public static IMobileElement GetElement(By by)  
{  
return \_IOSdriver.FindElement(by);

and in my library I use protected static AppiumDriver \_IOSdriver;  
I believe some of the later 2 are overwriting the driver command from Program. Is there any tweak to fix this it runs but not the way I am intending it to do?
