Calling swipe() on navigation bar area causes appium error due to bounds

Hi,

I am testing a program on Android with Appium v1.6.3 with an LG K7 and Samsung Galaxy S6 Edge+, on Linux with Python v2.7.

I am performing swipe gestures in my test program at different areas across the width of the screen. On the Galaxy, I have no issues whatsoever. However, with the LG, which has a navigation bar, I get errors from Appium.

In my test application, the navigation bar is fully hidden - so full screen mode. When I read the screen size, I get 480,782. This is not the full screen size. The height is minus the navigation bar. When I try to swipe the bottom of the screen, which is outside those bounds, Appium throws an error, and my try/except block fails. driver.swipe(1, 800, 479, 800). I know this is within the full screen size, but because it’s outside what Appium thinks are the boundaries, it fails.

My question is, how can I change the bounds that Appium has automatically set. There doesn’t seem to be any capability that I can set, and I have not found any commands to change it for each device - I am testing several. It’s important that I perform a swipe gesture in this area, where the navigation bar sits, albeit hidden.

Does anyone know how I can manually set the display bounds?

From Appium:
…[debug] Display bounds: [0,0][480,782]
…Sending command to android…action:swipe,params:startx:1, starty:800, endx:479, endy:800, steps:22
…Returning result: status:13…x=1.0, y=800.0 is outside of element rect: [0,0][480,782]