When trying to execute Javascript command on real iOS device with Safari 11, using Python code generated by AppiumStudio we get error.I would like to point out that its not only for timing but for some other javascript calls also.
As this is first post it doesnt allow me to post more then 2 links in post.
HW and SW used:
1.Device iOS: iPhone 7
2. Appium Studio v11.7.103
3.Python-Appium-Client version: 0.26
4.Selenium version: 3.12.0
AppiumStudio Code:
import unittest
import time
from appium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
class test1(unittest.TestCase):
reportDirectory = ‘reports’
reportFormat = ‘xml’
dc = {}
testName = ‘test1’
driver = None
def setUp(self):
self.dc['reportDirectory'] = self.reportDirectory
self.dc['reportFormat'] = self.reportFormat
self.dc['testName'] = self.testName
self.dc['udid'] = '5e08285bf62c12fef5606b28b99b40d889491b7c'
self.dc['browserName'] = 'Safari'
self.dc['platformName'] = 'ios'
self.driver = webdriver.Remote('http://localhost:4723/wd/hub',self.dc)
def testtest1(self):
self.driver.get("http://www.amazon.com")
result1 = self.driver.execute_script("var a = window.performance.timing")
def tearDown(self):
self.driver.quit()
if __name__ == '__main__':
unittest.main()