Page 1 of 1

ChromeDriver - WebDriver for Chrome

Posted: Sun Aug 30, 2020 9:09 am
by Horizon
Hi,

Is there anybody to use it from harbour?

Thanks.

Re: ChromeDriver - WebDriver for Chrome

Posted: Sun Aug 30, 2020 10:42 am
by Horizon
Hi,

We have to download chromedriver from https://chromedriver.chromium.org/downloads and copy it to pathed directory.
(https://chromedriver.chromium.org/getting-started)

To use it, We should download Selenium webdriver from https://www.selenium.dev/downloads/.

Next step is that run chromedriver using selenium webdriver and open any web site from application.

Re: ChromeDriver - WebDriver for Chrome

Posted: Fri Sep 04, 2020 9:25 am
by Horizon
Hi,

In order to test Selenium library. I have installed Visual Studio 2019 using C# by using this link https://testguild.com/selenium-webdriver-visual-studio/.

This is the latest C# code.

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;

namespace mySelenium
{
    class Program
    {
        static void Main(string[] args)
        {
            //!Make sure to add the path to where you extracting the chromedriver.exe:
            IWebDriver driver = new ChromeDriver(@"C:\WebDriver\bin"); //<-Add your path
            driver.Navigate().GoToUrl("http://forums.fivetechsupport.com/viewforum.php?f=3");

//            IWebElement myField = driver.FindElement(By.Id("btn red-flamingo"));
//            IWebElement myField = driver.FindElement(By.ClassName("red-flamingo"));
//            myField.Click();

//            myField = driver.FindElement(By.Name("tridField"));
//            myField.SendKeys("3333");

//            myField = driver.FindElement(By.Name("egpField"));
//            myField.SendKeys("4444");

            
//            myField = driver.FindElement(By.ClassName("submitButton"));
//            myField.Click();

 
            Thread.Sleep(15000);
            driver.Quit();
        }
    }
}
 
This code is opens a new chrome browser page and sleep 15 second than close it.

Next step, Can anyone help me to call it from Harbour?

Thanks.

Re: ChromeDriver - WebDriver for Chrome

Posted: Tue Sep 08, 2020 2:59 pm
by Horizon
Hi,

I build test project in c# msvc 2019. in the build folder, there is a Webdriver.dll file.

How to create lib file from this dll?