I've successfully loaded my test app on Android emulator and real device using Selendroid. When i run my test case in debug mode and get into the inspector, the left panel (app's image) works fine, but loading the tree gets 500 error, Internal Server Error.
In addition, I'm unable to find elements on my app. Every element i'm looking for, even regular div's, gets NoSuchElement in response. My app is indeed Hybrid, but when i'm trying to switch to WEBVIEW, I get an error. When I switch to NATIVE_APP, the test cases keep going but still no elements are found.
It's the same case whether I'm using emulator or real device.
My code is written in Python and looks like this:
import unittest
from selenium import webdriver
class FindElementTest(unittest.TestCase):
def setUp(self):
caps = {'aut': 'app:version'}
self.driver = webdriver.Remote(
desired_capabilities=caps
)
self.driver.implicitly_wait(10)
def test_find_element_by_id(self):
driver = self.driver
driver.get('and-activity://app..MainActivity')
driver.implicitly_wait(5)
driver.switch_to.window('WEBVIEW')
driver.find_element_by_class_name('login').click()