Skip to content

Commit bfea707

Browse files
committed
[dotnet] add name of what is being executed to large JS executions
1 parent cc727a2 commit bfea707

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dotnet/src/webdriver/RelativeBy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ protected RelativeBy() : base()
4848
}
4949
}
5050

51-
wrappedAtom = string.Format(CultureInfo.InvariantCulture, "return ({0}).apply(null, arguments);", atom);
51+
wrappedAtom = string.Format(CultureInfo.InvariantCulture, "/* findElements */return ({0}).apply(null, arguments);", atom);
5252
}
5353

5454
private RelativeBy(object root) : this(root, null)

dotnet/src/webdriver/WebElement.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ public virtual void Submit()
620620
}
621621
else
622622
{
623-
String script = "var form = arguments[0];\n" +
623+
String script = "/* submitForm */var form = arguments[0];\n" +
624624
"while (form.nodeName != \"FORM\" && form.parentNode) {\n" +
625625
" form = form.parentNode;\n" +
626626
"}\n" +
@@ -717,7 +717,8 @@ private static string GetAtom(string atomResourceName)
717717
}
718718
}
719719

720-
string wrappedAtom = string.Format(CultureInfo.InvariantCulture, "return ({0}).apply(null, arguments);", atom);
720+
string atomName = atomResourceName.Replace(".js", "");
721+
string wrappedAtom = string.Format(CultureInfo.InvariantCulture, "/* {0} */return ({1}).apply(null, arguments);", atomName, atom);
721722
return wrappedAtom;
722723
}
723724

0 commit comments

Comments
 (0)