How to hide an «Annoying Element» with appium

Sometimes it happens that an element in the work is very annoying and its absence is better.
In Selenium below is the code I use to hide the annoying elements.

driver.execute_script('document.querySelector("{}").style.display = "none";'.format('div.xvbhtw8.x1lq5wgf.xgqcy7u.x30kzoy.x9jhf4c.x1rj4ezl.x1n2onr6.xfr5jun.xexx8yu.x4uap5. x18d9i69.xkhd6sd'))

In fact, I manually set the «-- display --» Tag of that element in css as “none”.

But this method doesn’t work in appium!
Does anyone know a way to hide an element?

it will work with Appium if your app will be a WebView. With native apps no such functionality.

1 Like

No, it’s Instagram app
There is no other way to hide the element!?

No way with native app.

1 Like