This works fine for me, I didn’t switch context in iOS
def paypal_login(self):
input_email = self.driver.find_element_by_id(email_field)
input_email.send_keys("abcd")
input_password = self.driver.find_element_by_id(password_field)
input_password.send_keys("123456")
self.driver.hide_keyboard()
click_login_button = self.driver.find_element_by_id(self.login_btn)
click_login_button.click()
sleep(20)
click_agree_terms_btn = self.driver.find_element_by_id(self.agree_terms_btn)
click_agree_terms_btn.click()
sleep(20)