Problems with find_elements
In what language are the test written? Testes with Python 2.7 and Python 3.7
What version of AltUnityTester are you using? 1.3.0
On what device are you trying to run the test? Android
The OS from where you are running the test? MacOS
Summary
I had some problems using find_elements function. The first time i run it, it works perfectly, but when I try to run it again on another scene or after reloading the same scene, the test just freezes and don't show any logs. When i run the test with debugging, some time after the freeze, i got the log below.
Steps to reproduce
Run some test with find_elements function. Load another scene or reload the same scene and use find_elements again. Do it more than twice if necessary.
Relevant logs and/or screenshots
The method I'm using:
@classmethod
def tap_for_multiple(cls, element_name, index=0, timeout=20, interval=1):
print("Searching...")
cls.altdriver.wait_for_element(element_name, "", timeout)
print("Found")
print("Waiting...")
cls.altdriver.wait(1)
print("Waited Enough")
print("Looking for multiple")
element = cls.altdriver.find_elements(element_name)[index]
print("Found Multiple")
print("Checking Interactable...")
cls.check_interactable(cls, element, timeout, interval)
print("Checked Interactable")
print("Tapping...")
element.tap()
print("Tapped")
The error log:
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_comm.py", line 284, in _on_run
self.process_net_command_json(self.global_debugger_holder.global_dbg, json_contents)
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py", line 157, in process_net_command_json
cmd = on_request(py_db, request)
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py", line 559, in on_evaluate_request
py_db, request, thread_id)
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_api.py", line 385, in request_exec_or_evaluate_json
thread_id, internal_evaluate_expression_json, request, thread_id)
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/pydevd.py", line 873, in post_method_as_internal_command
self.post_internal_command(internal_cmd, thread_id)
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/pydevd.py", line 877, in post_internal_command
queue = self.get_internal_queue(thread_id)
File "/Users/igor/.vscode/extensions/ms-python.python-2019.4.12954/pythonFiles/lib/python/ptvsd/_vendored/pydevd/pydevd.py", line 864, in get_internal_queue
if thread_id.startswith('__frame__'):
AttributeError: 'NoneType' object has no attribute 'startswith'