In https://github.com/web-platform-tests/wpt/pull/21369 I have debugged why there are new failures in STP 99 compared to STP 98: https://github.com/web-platform-tests/wpt/pull/21359#issuecomment-577519963 At the root of it is a "JavaScriptError;Unexpected keyword 'function'. Expected ')' to end a compound expression." which seems to be a failure to execute an internal script called WDFindNodes.js. In https://wpt.fyi/results/webdriver/tests?diff&filter=ADC&run_id=416830016&run_id=393600011 it looks like this affects many WebDriver endpoints, not just "find elements".
<rdar://problem/58838680>
Can confirm this is a recent regression, not sure where the fix is yet. I am assuming that the regression point is <https://trac.webkit.org/changeset/254329/webkit> but I have not confirmed. Will keep this updated as I dig further with a debug build.
r254329 indeed caused a problem with how safaridriver inserts sourceURL directives. A fix has been submitted for review on the safaridriver side. No fix needed in WebKit, thus no further updates will be provided here. The fix should be included in the next release of Safari Technology Preview. Unfortunately there is no workaround for this issue in STP99.
*** Bug 206827 has been marked as a duplicate of this bug. ***