简体   繁体   English

在 IE 模式下打开边缘

[英]Open Edge In IE Mode

Sub Resolve()

    Dim obj As New WebDriver
    obj.Start "Edge", ""
    obj.Get "wwww.website for example.com"
    obj.FindElementById("s_swepi_1").SendKeys (ThisWorkbook.Sheets("Actions").Range("J1").Value)
    obj.FindElementById("s_swepi_2").SendKeys (ThisWorkbook.Sheets("Actions").Range("J2").Value)
    obj.FindElementByLinkText("Login").Click
    Application.Wait (Now + TimeValue("0:00:10"))
    For i = 1 To 1000 ' change 10 to the number of rows you want to loop through
    If ThisWorkbook.Sheets("Actions").Range("A" & i).Value = "" Then
            MsgBox "Finish"
            Exit For
        End If
        obj.FindElementById("s_1_1_4_0_Ctrl").Click
        obj.FindElementById("1_s_1_l_SR_Id").Click
        obj.FindElementById("1_SR_Id").SendKeys (ThisWorkbook.Sheets("Actions").Range("A" & i).Value)
        obj.FindElementById("s_1_1_0_0_Ctrl").Click
        obj.FindElementByName("s_2_1_40_0").ClickDouble
        obj.FindElementByName("s_2_1_40_0").SendKeys (ThisWorkbook.Sheets("Actions").Range("D" & i).Value)
        obj.FindElementByName("s_2_1_53_0").ClickDouble
        obj.FindElementByName("s_2_1_53_0").SendKeys (ThisWorkbook.Sheets("Actions").Range("B" & i).Value)
        obj.FindElementById("1_s_1_l_Type").ClickDouble
        obj.FindElementByName("s_3_1_43_0").SendKeys (ThisWorkbook.Sheets("Actions").Range("C" & i).Value)
        obj.FindElementById("1_s_1_l_Type").ClickDouble
    Next i
End Sub



I need your support to help me to modify the mentioned code to open Edge browser in IE mode as i tried more that one modification but with no luck.我需要您的支持来帮助我修改上述代码以Edge browser in IE mode因为我尝试了多次修改但没有成功。

I'll have to say automate IE mode using VBA Selenium is currently impossible.我不得不说使用 VBA Selenium 自动化 IE 模式目前是不可能的。 One of the prerequisites for automating IE mode is to define Inte.netExplorerOptions ( doc for reference ), which VBA Selenium does not have. IE模式自动化的先决条件之一是定义Inte.netExplorerOptions参考文档),VBA Selenium没有。 However, I have found some possible alternatives for you.但是,我为您找到了一些可能的替代方案。 Please check this thread .请检查此线程

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

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