本文整理汇总了Python中core.tns.tns.Tns.debug_ios方法的典型用法代码示例。如果您正苦于以下问题:Python Tns.debug_ios方法的具体用法?Python Tns.debug_ios怎么用?Python Tns.debug_ios使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.tns.tns.Tns
的用法示例。
在下文中一共展示了Tns.debug_ios方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_100_debug_ios_simulator_with_livesync
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import debug_ios [as 别名]
def test_100_debug_ios_simulator_with_livesync(self):
"""
`tns debug ios` should be able to run with livesync
"""
log = Tns.debug_ios(attributes={'--path': self.app_name, '--emulator': '', '--inspector': ''})
DebugiOSInspectorSimulatorTests.__verify_debugger_attach(log)
# Verify app starts and do not stop on first line of code
Device.screen_match(device_name=SIMULATOR_NAME,
device_id=self.SIMULATOR_ID, expected_image='livesync-hello-world_home')
# Change JS and wait until app is synced
ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_JS, sleep=10)
strings = ['Successfully transferred', 'main-view-model.js', 'CONSOLE LOG',
'Backend socket closed', 'Frontend socket closed',
'Frontend client connected', 'Backend socket created', 'NativeScript debugger attached']
Tns.wait_for_log(log_file=log, string_list=strings)
# Change XML and wait until app is synced. App doesn't restart from 5.1.0 version
ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_XML, sleep=3)
strings = ['Successfully transferred', 'main-page.xml', 'CONSOLE LOG']
Tns.wait_for_log(log_file=log, string_list=strings)
# Change CSS and wait until app is synced. App doesn't restart from 5.1.0 version
ReplaceHelper.replace(self.app_name, ReplaceHelper.CHANGE_CSS, sleep=3)
strings = ['Successfully transferred', 'app.css', 'CONSOLE LOG']
Tns.wait_for_log(log_file=log, string_list=strings)
# Verify application looks correct
Device.screen_match(device_name=SIMULATOR_NAME, device_id=self.SIMULATOR_ID,
expected_image='livesync-hello-world_js_css_xml', tolerance=0.26)
assert Process.is_running('NativeScript Inspector')
示例2: test_001_debug_ios_simulator
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import debug_ios [as 别名]
def test_001_debug_ios_simulator(self):
"""
Default `tns debug ios` starts debugger (do not stop at the first code statement)
"""
log = Tns.debug_ios(attributes={'--path': self.app_name, '--emulator': '', '--inspector': ''})
DebugiOSInspectorSimulatorTests.__verify_debugger_attach(log)
# Verify app starts and do not stop on first line of code
Device.screen_match(device_name=SIMULATOR_NAME,
device_id=self.SIMULATOR_ID, expected_image='livesync-hello-world_home')
示例3: test_002_debug_ios_simulator_debug_brk
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import debug_ios [as 别名]
def test_002_debug_ios_simulator_debug_brk(self):
"""
Starts debugger and stop at the first code statement.
"""
log = Tns.debug_ios(
attributes={'--path': self.app_name, '--emulator': '', '--debug-brk': '', '--inspector': ''})
DebugiOSInspectorSimulatorTests.__verify_debugger_attach(log, app_started=False)
# In this case `app_started` is False because app is not loaded when using '--debug-brk'.
# '--debug-brk' stops before app loaded.
# Verify app starts and do not stop on first line of code
Device.screen_match(device_name=SIMULATOR_NAME, tolerance=3.0, device_id=self.SIMULATOR_ID,
expected_image='livesync-hello-world_debug_brk')
示例4: test_003_debug_ios_simulator_start
# 需要导入模块: from core.tns.tns import Tns [as 别名]
# 或者: from core.tns.tns.Tns import debug_ios [as 别名]
def test_003_debug_ios_simulator_start(self):
"""
Attach the debug tools to a running app in the iOS Simulator
"""
# Run the app and ensure it works
log = Tns.run_ios(attributes={'--path': self.app_name, '--emulator': '', '--justlaunch': ''},
assert_success=False, timeout=30)
TnsAsserts.prepared(app_name=self.app_name, platform=Platform.IOS, output=log, prepare=Prepare.SKIP)
Device.screen_match(device_name=SIMULATOR_NAME, device_id=self.SIMULATOR_ID,
expected_image='livesync-hello-world_home')
# Attach debugger
log = Tns.debug_ios(attributes={'--path': self.app_name, '--emulator': '', '--start': '', '--inspector': ''})
DebugiOSInspectorSimulatorTests.__verify_debugger_attach(log, app_started=False)