apologies for the simple nature of the question.
I have some tests that wait until either a screen is loaded (mobile safari) or until a specified length of time (native ioS), these tests were previously working, but now it seems like the wait is being ignored. I am assuming i should either have a preference set in the UI that i dont, or run node with an argument..
the simplest versions being (for the safari example, apologies for the crappy code..);
import unittest
import os
import time
from selenium import webdriver
import selenium.webdriver.support.ui as ui
class TestSequenceFunctions(unittest.TestCase):
def setUp(self):
# set up appium
self.driver = webdriver.Remote(
desired_capabilities={
'browserName': 'iOS',
'device':'iPad',
'platform': 'Mac',
'version': '6.1',
'app': 'Safari',
})
def test_ui_items(self):
#onelogin sign in
wait = ui.WebDriverWait(self.driver,8)
wait.until(lambda driver: self.driver.title.startswith('xxxx'))
self.driver.find_element_by_link_text('WDesk').click()
I am getting a NoSuchElement exception at the point in time the WDesk link should be loaded.
Traceback (most recent call last):
File "test_webfilings.py", line 30, in test_ui_items
self.driver.find_element_by_link_text('WDesk').click()
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 241, in find_element_by_link_text
return self.find_element(by=By.LINK_TEXT, value=link_text)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 675, in find_element
{'using': by, 'value': value})['value']
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 160, in execute
self.error_handler.check_response(response)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 149, in check_response
raise exception_class(message, screen, stacktrace)
NoSuchElementException: Message: u'An element could not be located on the page using the given search parameters.'