How do i use "wait until" element before certain page is displayed? (using python 3.7)

Hi guys,
First of all, i am a newbie in testing app using appium (python 3.7). Here, i am testing an app where i have to wait right after login process is completed. I have done this using implicit wait. But now, to make the testing process more dynamic i want to wait until the next page is displayed.

Note: I have seen and tried several issues of this forum but could not help myself.

Here’s the code,

from appium import webdriver
from import WebDriverWait

desired_cap = {
“platformName”: “Android”,
“deviceName”: “QDG9X18426W11577”,
“newCommandTimeout”: “240”,
“app”: “C:\Users\tahmina\Downloads\test.apk”,
“appPackage”: “”,
“appActivity”: “”
#Making connection with Appium server
driver = webdriver.Remote(“http://localhost:4723/wd/hub”, desired_cap)

#Here i have used implicit wait to load the login page

#Login to the app
search_element = driver.find_element_by_id(‘Username’).send_keys(‘test email address’)
search_element = driver.find_element_by_id(‘Password’).send_keys(‘test password’)
search_element = driver.find_element_by_xpath(

wait = WebDriverWait(driver, 10)
#Waiting until the next process comes up
if webdriver.wait.until(driver.find_element_by_id(‘’).is_displayed()):
print(‘Run the next process’)
elif webdriver.wait.until(not driver.find_element_by_id(‘’)):
print(‘Something went wrong!’)

#Searching employee by using ID
search_element = driver.find_element_by_id(‘’).send_keys(‘1018’)
driver.execute_script(‘mobile:performEditorAction’, {‘action’: ‘search’})

Guide me if anyone of you have any solution.