Hi all , am trying to create open & maximize the browser in a single activity.
i attached code for ref:
using System;
using System.Activities;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using WebDriverManager.DriverConfigs.Impl;
namespace OpenandMaximizeBrowser
{
public class OpenandMaximazeChromeBrowser : CodeActivity
{
[Category(“Input”)]
[RequiredArgument]
public InArgument URL{ get; set; }
protected override void Execute(CodeActivityContext context)
{
try
{
new WebDriverManager.DriverManager().SetUpDriver(new ChromeConfig());
IWebDriver driver = new ChromeDriver();
//this.driver = driver;
driver.Navigate().GoToUrl(URL.Get(context));
driver.Manage().Window.Maximize();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
// throw new NotImplementedException();
}
}
}
i created dll for this , but facing error like :
System.IO.FileNotFoundException: Could not load file or assembly ‘WebDriver, Version=3.141.0.0, Culture=neutral, PublicKeyToken=null’ or one of its dependencies. The system cannot find the file specified.
File name: ‘WebDriver, Version=3.141.0.0, Culture=neutral, PublicKeyToken=null’
at OpenandMaximizeBrowser.OpenandMaximazeChromeBrowser.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!
can anyone say me how to resolve this .
thanks in advance
![]()