gpt4 book ai didi

javascript - Safari (12.1) Webdriver 在 Selenium click() 和 actions.clickAndHold([some web element]).perform() 上发生硬崩溃

转载 作者:行者123 更新时间:2023-12-02 04:06:32 26 4
gpt4 key购买 nike

当我运行 selenium 脚本时,如果单击某些链接,我将在运行 Safari Web 浏览器时发生严重崩溃。

对于大多数点击操作,Safari Webdriver 没问题,但如果我执行 webElement.click() webElement。 actions.clickAndHold([some web element]).perform() 驱动程序将崩溃。

这只发生在页脚跳转链接的网页元素上(例如,当用户单击链接时,页面将向下滚动到页脚)。

此外,这只发生在 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 键并单击时,我遇到了同样的崩溃。我将链式操作分解为单独的部分,对我来说,它在 Action.KeyDown(elem, Keys.Shift).Perform() 处崩溃

我断断续续地搞了两天,没有任何实际进展。

关于javascript - Safari (12.1) Webdriver 在 Selenium click() 和 actions.clickAndHold([some web element]).perform() 上发生硬崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56710667/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com