Skip to content

Commit 6e414f8

Browse files
Resolved UI test cases issue
1 parent d0a4526 commit 6e414f8

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

  • checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui

checkmarx-ast-eclipse-plugin-tests/src/test/java/checkmarx/ast/eclipse/plugin/tests/ui/BaseUITest.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -302,18 +302,23 @@ protected static void waitUntilBranchComboIsEnabled() throws TimeoutException {
302302
* Wait for connection response
303303
*/
304304
protected static void waitForConnectionResponse() throws TimeoutException {
305-
int retryIdx = 0;
306-
while (!_bot.text(2).getText().equals(INFO_SUCCESSFUL_CONNECTION)) {
307-
if (retryIdx == 10) {
308-
break;
309-
}
310-
_bot.sleep(1000);
311-
retryIdx++;
312-
}
305+
int retryIdx = 0;
313306

314-
if (retryIdx == 10) {
315-
throw new TimeoutException("Connection validation timeout after 10000ms.");
316-
}
307+
while (true) {
308+
309+
String text = _bot.text().getText();
310+
311+
if (text.contains(INFO_SUCCESSFUL_CONNECTION)) {
312+
return;
313+
}
314+
315+
if (retryIdx == 10) {
316+
throw new TimeoutException("Connection validation timeout after 10000ms.");
317+
}
318+
319+
_bot.sleep(1000);
320+
retryIdx++;
321+
}
317322
}
318323

319324
/**

0 commit comments

Comments
 (0)