We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa5b875 commit bfdf117Copy full SHA for bfdf117
Applications/SlicerApp/Testing/Python/WebEngine.py
@@ -170,12 +170,14 @@ def test_WebEngine1(self):
170
webWidget.evalJS("valueFromSlicer;");
171
172
iteration = 0
173
- while not self.gotResponse:
174
- self.delayDisplay('Waiting for response...')
+ while not self.gotResponse and iteration < 3:
+ # Specify an explicit delay to ensure async execution by the
175
+ # webengine has completed.
176
+ self.delayDisplay('Waiting for response...', msec=500)
177
iteration += 1
178
webWidget.disconnect("evalResult(QString,QString)", self.onEvalResult)
179
- if iteration >= 10:
180
+ if not self.gotResponse:
181
raise RuntimeError("Never got response from evalJS")
182
183
if not self.gotCorrectResponse:
0 commit comments