how to c# ranorex Selenium web integration

Ask general questions here.
Mertcan
Posts: 2
Joined: Fri Oct 04, 2019 9:50 am

how to c# ranorex Selenium web integration

Post by Mertcan » Fri Oct 04, 2019 10:25 am

Using library

using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Drawing;
using System.Threading;
using WinForms = System.Windows.Forms;
using Ranorex;
using Ranorex.Core;
using Ranorex.Core.Testing;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;


IWebDriver driver = new FirefoxDriver();
string link = @"https://www.n11.com/";

driver.Navigate().GoToUrl(link);

driver.FindElement(By.ClassName("btnSignIn")).Click();

this code gives error in ranorex studio running .net


errors

The type 'OpenQA.Selenium.IWebDriver' is in both 'c: \ Program Files (x86) \ Ranorex \ Studio \ Bin \ Ranorex.Plugin.WebDriver.dll' and 'c: \ Users \ berka \ Documents \ Ranorex \ RanorexStudio Projects exists in \ selenium \ packages \ Selenium.WebDriver.3.141.0 \ lib \ net45 \ WebDriver.dll (CS0433) - C: \ Users \ berka \ Documents \ Ranorex \ RanorexStudio Projects \ selenium \ selenium \ Login.cs: 51 4



The 'OpenQA.Selenium.Firefox.FirefoxDriver' type cannot be implicitly converted to the 'OpenQA.Selenium.IWebDriver' type. Open conversion exists (missing assignment?) (CS0266) - C: \ Users \ berka \ Documents \ Ranorex \ RanorexStudio Projects \ selenium \ selenium \ Login.cs: 51.24


The type 'OpenQA.Selenium.By' is available in both 'c: \ Program Files (x86) \ Ranorex \ Studio \ Bin \ Ranorex.Plugin.WebDriver.dll' and 'c: \ Users \ berka \ Documents \ Ranorex \ RanorexStudio Projects exists in \ selenium \ packages \ Selenium.WebDriver.3.141.0 \ lib \ net45 \ WebDriver.dll (CS0433) - C: \ Users \ berka \ Documents \ Ranorex \ RanorexStudio Projects \ selenium \ selenium \ Login.cs: 56 32