In a post a while back, the ask was about automating Edge once IE support is deprecated... had some spare time and downloaded SeleniumBasic [just google, it installs in your user appdata/local folder] and got the most recent Edge WebDriver [copied to appdata/local, deleted current edgedriver and renamed it - msedgedriver.exe => edgedriver.exe].
Then the fun part: just wanted to open a url
- the basic .vbs script [I added a url ] worked
Set Assert = CreateObject("Selenium.Assert")
Class Script
Dim driver
Sub Class_Initialize
Set driver = CreateObject("Selenium.EdgeDriver")
driver.Get "https://www.automationandagile.com/p/sample-form.html"
driver.FindElementByName("fname").Sendkeys ("Win")
driver.FindElementByName("lname").Sendkeys ("Batch")
driver.FindElementByXPath("*//*[@value='m']").Click
driver.FindElementByXPath("*//*[@value='Poetry']").Click
driver.FindElementByXPath("*//*[@value='Reading']").Click
driver.FindElementByName("occupation").AsSelect.SelectByText ("Business")
driver.FindElementByName("day").AsSelect.SelectByText ("25")
driver.FindElementByName("month").AsSelect.SelectByText ("Mar")
driver.FindElementByXpath("(//*[@name='day'])[2]").AsSelect.selectByText("1996")
WScript.Echo "Click OK to quit."
End Sub
Sub Class_Terminate
driver.Quit
End Sub
End Class
Set s = New Script
- but try to replicate in WB [fails with Invalid Class String]
url = "https://www.automationandagile.com/p/sample-form.html"
Assert = CreateObject("Selenium.Assert")
driver = CreateObject("Selenium.EdgeDriver")
driver.Get(url)
when I downloaded the Edge WebDriver, I specified x86 which I assumed would be correct for WB CreateObject()...
any ideas.