繁体   English   中英

Safari(12.1)Selenium上的Webdriver硬件崩溃click()和actions.clickAndHold([some web element])。perform()

[英]Safari (12.1) Webdriver hard crash on Selenium click() and actions.clickAndHold([some web element]).perform()

当我运行我的selenium脚本时,如果我点击某些链接,当我运行Safari网络浏览器时,我将遇到严重的崩溃。

对于大多数点击操作,Safari Webdriver都可以,但如果我webElement.click()形成webElement.click() webElement.actions.clickAndHold([some web element]).perform()驱动程序将崩溃。

这仅适用于页脚跳转链接的Web元素(例如,当用户单击链接时页面将向下滚动到页脚)。

此外,这只发生在Safari中。 Chrome,Firefox等都很好。

有没有人遇到这样的事情,如果有的话有解决办法(比如可能还有其他一些点击网元的方式)?

这开始于新发布的Safari 12.1.1浏览器(以前工作正常)

认为这是导致崩溃的网页上的Javascript部分:

        $.each(t, function(n, t) {
            var i = $(t)
              , r = p(i);
            r && r.not("[tabindex],input,textarea").attr("tabindex", -1);
            r && (i.data("anchor") ? console.warn("%c attr [data-anchor] is deprecated; use [href] or [data-jump-target] instead", "background: #222; color: #7fda55; font-size: 14px; padding: 4px", i[0]) : i.is(".jumpLink, .anchor-link, .superscript-link") && console.warn('%c classes .jumpLink, .anchor-link, .superscript-link for anchors are deprecated; use <a href="#value"> or <div data-jump-target="value"> instead', "background: #222; color: #7fda55; font-size: 12px; padding: 2px", i[0]))
        });

这是Safari投掷的错误:

Process:               Safari [24240]
Path:                  /Applications/Safari.app/Contents/MacOS/Safari
Identifier:            com.apple.Safari
Version:               12.1.1 (14607.2.6.1.1)
Build Info:            WebBrowser-7607002006001001~3
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Safari [24240]
User ID:               502

Date/Time:             2019-06-21 15:16:23.521 -0600
OS Version:            Mac OS X 10.14.5 (18F203)
Report Version:        12
Bridge OS Version:     3.5 (16P5200)
Anonymous UUID:        56C84AF4-983B-688C-12EB-52065287562D

Sleep/Wake UUID:       6B696843-31A9-4795-B29B-E3D128CE40A4

Time Awake Since Boot: 57000 seconds
Time Since Wake:       720 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [24240]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit                0x00007fff49065320 WTF::Function<void (WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>)>::CallableWrapper<WebKit::SimulatedInputDispatcher::resolveLocation(WebCore::IntPoint const&, WTF::Optional<WebCore::IntPoint>, Inspector::Protocol::Automation::MouseMoveOrigin, WTF::Optional<WTF::String>, WTF::Function<void (WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>)>&&)::$_2>::call(WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>) + 346
1   com.apple.WebKit                0x00007fff49053bd6 WTF::Function<void (WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>)>::operator()(WTF::Optional<WebCore::IntPoint>, WTF::Optional<WebKit::AutomationCommandError>) const + 72
2   com.apple.WebKit                0x00007fff4905a707 WebKit::WebAutomationSession::didComputeElementLayout(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&) + 1283
3   com.apple.WebKit                0x00007fff49161b12 void IPC::callMemberFunctionImpl<WebKit::WebAutomationSession, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&), std::__1::tuple<unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String>, 0ul, 1ul, 2ul, 3ul, 4ul>(WebKit::WebAutomationSession*, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&), std::__1::tuple<unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul, 4ul>) + 91
4   com.apple.WebKit                0x00007fff491615f0 void IPC::handleMessage<Messages::WebAutomationSession::DidComputeElementLayout, WebKit::WebAutomationSession, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&)>(IPC::Decoder&, WebKit::WebAutomationSession*, void (WebKit::WebAutomationSession::*)(unsigned long long, WebCore::IntRect, WTF::Optional<WebCore::IntPoint>, bool, WTF::String const&)) + 99
5   com.apple.WebKit                0x00007fff48e0e9b6 IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&, IPC::Decoder&) + 64

(还有更多的错误信息,这只是上半部分)。

使用Action类执行shift-click时,我看到同样的崩溃。 我将链式操作分解为单独的部分,对于我来说,它在Action.KeyDown(elem,Keys.Shift)崩溃.Perform()

我一直在搞乱这两天,没有真正的进展。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM