Results 1 to 6 of 6

Thread: [RESOLVED] Selenium and Edge

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2013
    Location
    San Francisco, CA
    Posts
    528

    Resolved [RESOLVED] Selenium and Edge

    I'm trying to use Selenium to automate my login to the Morningstar website using the Microsoft Edge browser. This is my first time working with Selenium.

    I've added the following project references:

    WebDriver
    WebDriver.Support

    I've imported the following namespaces:

    OpenQA
    OpenQA.Selenium
    OpenQA.Selenium.Edge
    OpenQA.Selenium.Support.UI

    Here's a code snippet.

    Code:
    Imports OpenQA
    Imports OpenQA.Selenium
    Imports OpenQA.Selenium.Edge
    Imports OpenQA.Selenium.Support.UI
    Code:
        Sub Main()
    
            Dim driver As EdgeDriver
            Dim myElement As EdgeWebElement
            Dim strURL As String = ""
            Dim strUN As String = ""
            Dim strPW As String = ""
    
            strURL = "https://members.morningstar.com/memberservice/login.aspx"
            strUN = "MyUserName"
            strPW = "MyPassword"
    
            Try
                driver = New EdgeDriver
                driver.Navigate.GoToUrl(strURL)
    
                myElement = GetWebElement(driver, By.Id("uim-uEmail-input"), 10)
                myElement.SendKeys(strUN)
    
                myElement = GetWebElement(driver, By.Id("uim-uPassword-input"), 10)
                myElement.SendKeys(strPW)
    
                myElement = GetWebElement(driver, By.Id("remember_me"), 10)
                myElement.Click()
    
                myElement = GetWebElement(driver, By.Id("uim-login-submit"), 10)
                myElement.Click()
    
            Catch ex As WebDriverException
    
            Catch ex As Exception
    
            End Try
    
        End Sub
    A WebDriverException is raised when the "driver = New EdgeDriver" line executes (a blank Edge page opens).

    I'd appreciate any advice for how to resolve this error.

    Thanks.
    Last edited by Mark@SF; Apr 13th, 2019 at 08:47 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width