Skip to content

Commit ac8b55d

Browse files
committed
Use helper to avoid 'JavaScriptException'
1 parent 8bb7e81 commit ac8b55d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,9 @@ public Locator getAssayWell(String text, String color)
223223

224224
public String getPageText()
225225
{
226+
String text = _test.getHtmlSource();
226227
//the browser converts line breaks to spaces. this is a hack to get them back
227-
String text = _test.getDriver().getPageSource().replaceAll("<[^>]+>|&[^;]+;", "");
228+
text = text.replaceAll("<[^>]+>|&[^;]+;", "");
228229
text = text.replaceAll(" {2,}", " ");
229230
text = text.replaceAll(", ", ",\n").replaceAll("] ", "]\n");
230231
return text;

0 commit comments

Comments
 (0)