脚本为打开浏览器进入网址,Run Test Suite后,ride无反应,但cmd窗口抛错如下:
AttributeError: No attribute or settings with name '_test_names_to_run' found
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunnerplug
in.py", line 257, in OnRun
return
File "C:\Python27\lib\site-packages\robotide\contrib\testrunner\testrunnerplug
in.py", line 275, in _create_command
self.global_settings.get('pythonpath', None),
File "C:\Python27\lib\site-packages\robotide\pluginapi\plugin.py", line 134, i
n __getattr__
raise AttributeError("No attribute or settings with name '%s' found" % name)
AttributeError: No attribute or settings with name '_test_names_to_run' found
解决方法参考:
https://github.com/robotframework/RIDE/commit/507a0eab233b7eedde8b34fac0d76ba45825e7d8#L0L132
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 | from robotide.action.shortcut import localize_shortcuts |
55 | 55 | from robotide.contrib.testrunner.runprofiles import CustomScriptProfile |
56 | 56 | from robotide.contrib.testrunner.testrunner import TestRunner |
57 | -from robotide.publish.messages import RideTestSelectedForRunningChanged | |
57 | +from robotide.publish.messages import RideTestSelectedForRunningChanged, RideNewProject | |
58 | 58 | |
59 | 59 | ON_POSIX = 'posix' in sys.builtin_module_names |
60 | 60 | |
... | ... | @@ -130,6 +130,7 @@ def __init__(self, application=None): |
130 | 130 | self._test_runner = TestRunner(application.model) |
131 | 131 | self._register_shortcuts() |
132 | 132 | self._min_log_level_number = LEVELS['INFO'] |
133 | + self._test_names_to_run = set() | |
133 | 134 | |
134 | 135 | def _register_shortcuts(self): |
135 | 136 | self.register_shortcut('CtrlCmd-C', self._copy_from_out) |
... | ... | @@ -193,6 +194,7 @@ def _get_all_subclasses(self, class_): |
193 | 194 | def _subscribe_to_events(self): |
194 | 195 | self.subscribe(self.OnTestSelectedForRunningChanged, RideTestSelectedForRunningChanged) |
195 | 196 | self.subscribe(self.OnOpenSuite, RideOpenSuite) |
197 | + self.subscribe(self.OnOpenSuite, RideNewProject) | |
196 | 198 | |
197 | 199 | def OnTestSelectedForRunningChanged(self, message): |
198 | 200 | if message.running: |