You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -226,7 +227,7 @@ public HTMLElement findElement(HTMLElement parentElement,ObjectMapping objectMap
226
227
227
228
}
228
229
if (clauseResults.size() > 1 && !allowMultipleMatches) {
229
-
StringerrorText = String.format("Found %d matching elements using ([%s] - %s) from [%s] (Waited upto %dmS). allowMultipleMatches=false so error!",
230
+
StringerrorText = String.format("Found %d matching elements using [%s] ([%s]) from [%s]. Not allowing mutiple matches and timeout reached after [%dmS]",
230
231
clauseResults.size(),
231
232
objectMapping.getActualFindLogic(),
232
233
objectMapping.getFriendlyName(),
@@ -258,18 +259,18 @@ public HTMLElement findElement(HTMLElement parentElement,ObjectMapping objectMap
258
259
break;
259
260
} else {
260
261
if (timer.getTime()>=totalTimeoutMillis) {
261
-
Logger.WriteLine(Logger.LogLevels.Error, "From [%s], find [%s (%s)] returned %d matches (%s multiple matches). We must wait until stable, element 0 is NOT stable and timeout reached so throwing",
262
+
Logger.WriteLine(Logger.LogLevels.Error, "From [%s], find [%s (%s)] returned %d matches (%sllowing multiple matches). Element NOT stable after timeout reached so throwing",
262
263
(parentElement == null) ? "DOM Top Level" : parentElement.getMappingDetails().getFriendlyName(),
263
264
objectMapping.getActualFindLogic(),
264
265
objectMapping.getFriendlyName(),
265
266
clauseResults.size(),
266
-
(allowMultipleMatches) ? "Allowing" : "Not");
267
-
thrownewRuntimeException(String.format("From [%s], find [%s (%s)] returned %d matches (%s multiple matches). We must wait until stable and element 0 NOT stable and timeout reached after %dmS.",
267
+
(allowMultipleMatches) ? "A" : "Not A");
268
+
thrownewRuntimeException(String.format("From [%s], find [%s (%s)] returned %d matches (%sllowing multiple matches). Element NOT stable after timeout reached ([%dmS]).",
268
269
(parentElement == null) ? "DOM Top Level" : parentElement.getMappingDetails().getFriendlyName(),
269
270
objectMapping.getActualFindLogic(),
270
271
objectMapping.getFriendlyName(),
271
272
clauseResults.size(),
272
-
(allowMultipleMatches) ? "Allowing" : "Not",
273
+
(allowMultipleMatches) ? "A" : "Not A",
273
274
timer.getTime()));
274
275
}
275
276
Logger.WriteLine(Logger.LogLevels.TestDebug, "From [%s], find [%s (%s)] returned %d matches (%s multiple matches). Element 0 is NOT stable and we must wait until stable...",
@@ -279,6 +280,8 @@ public HTMLElement findElement(HTMLElement parentElement,ObjectMapping objectMap
279
280
clauseResults.size(),
280
281
(allowMultipleMatches) ? "Allowing" : "Not");
281
282
}
283
+
} else {
284
+
break;
282
285
}
283
286
}
284
287
returnclauseResults.get(0);
@@ -301,7 +304,15 @@ public List<HTMLElement> findElements(HTMLElement parentElement, ObjectMapping m
301
304
302
305
try {
303
306
Logger.WriteLine(Logger.LogLevels.FrameworkDebug,"Calling Selenium WebDriver findElements with By = [%s]",seleniumFindBy.toString());
thrownewRuntimeException(String.format("Selenium Driver error. Find Logic [%s] for [%s] is invalid!",mapping.getActualFindLogic(),mapping.getFriendlyName(),e));
305
316
}
306
317
catch (WebDriverExceptione)
307
318
{
@@ -320,9 +331,9 @@ public List<HTMLElement> findElements(HTMLElement parentElement, ObjectMapping m
320
331
}
321
332
322
333
if (parentElement==null)
323
-
Logger.WriteLine(Logger.LogLevels.TestInformation,"Found [%d] elements matching [%s] (%s)",foundElements.size(),mapping.getOriginalFindLogic(),mapping.getFriendlyName());
334
+
Logger.WriteLine(Logger.LogLevels.FrameworkDebug,"Found [%d] elements matching [%s] (%s)",foundElements.size(),mapping.getOriginalFindLogic(),mapping.getFriendlyName());
324
335
else
325
-
Logger.WriteLine(Logger.LogLevels.TestInformation,"Found [%d] elements matching [%s] (%s) offset from [%s]",foundElements.size(),mapping.getOriginalFindLogic(),mapping.getFriendlyName(),parentElement.getMappingDetails().getFriendlyName());
336
+
Logger.WriteLine(Logger.LogLevels.FrameworkDebug,"Found [%d] elements matching [%s] (%s) offset from [%s]",foundElements.size(),mapping.getOriginalFindLogic(),mapping.getFriendlyName(),parentElement.getMappingDetails().getFriendlyName());
0 commit comments