Selenium 流体自动化&x2B;脚本不起作用
我阅读了Scott Hanselmans的博客文章,试图让scriptcs+FluentAutomation正常工作: 问题是,fluent automation网站上的演示代码根本不起作用: Scotts博客上的代码更接近,但仍然不存在: 例如:Selenium 流体自动化&x2B;脚本不起作用,selenium,fluentautomation,scriptcs,Selenium,Fluentautomation,Scriptcs,我阅读了Scott Hanselmans的博客文章,试图让scriptcs+FluentAutomation正常工作: 问题是,fluent automation网站上的演示代码根本不起作用: Scotts博客上的代码更接近,但仍然不存在: 例如: var Test = Require<F14N>() .Init<FluentAutomation.SeleniumWebDriver>() .Bootstrap("Chrome") .Config(
var Test = Require<F14N>()
.Init<FluentAutomation.SeleniumWebDriver>()
.Bootstrap("Chrome")
.Config(settings => {
// Easy access to FluentAutomation.Settings values
settings.DefaultWaitUntilTimeout = TimeSpan.FromSeconds(1);
});
Test.Run("Hello Google", I => {
I.Open(http://google.com);
});
var Test=Require()
.Init()
.Bootstrap(“Chrome”)
.Config(设置=>{
//轻松访问FluentAutomation。设置值
settings.DefaultWaitUntilTimeout=TimeSpan.FromSeconds(1);
});
Test.Run(“Hello Google”,I=>{
一、公开(http://google.com);
});
结果如下:
--------------------------------------------------------------------------
F14N - Fluent Automation Console
-------------------------------------------------------------------------
1) Hello Google
----------------------------------------------------------------------
Unable to resolve type: OpenQA.Selenium.IWebDriver
--------
An unexpected exception was thrown inside WaitUntil(Action). See
InnerException for details.
at FluentAutomation.BaseCommandProvider.<>c__DisplayClass9.<WaitUnt
il>b__8()
at FluentAutomation.BaseCommandProvider.Act(CommandType commandType
, Action action)
at FluentAutomation.BaseCommandProvider.WaitUntil(Expression`1 cond
itionAction, TimeSpan timeout)
at FluentAutomation.BaseCommandProvider.Act(CommandType commandType
, Action action)
at FluentAutomation.CommandProvider.Navigate(Uri url)
at FluentAutomation.ActionSyntaxProvider.Open(Uri url)
at FluentAutomation.ActionSyntaxProvider.Open(String url)
at Submission#0.<.ctor>b__2(IActionSyntaxProvider I)
at ScriptCs.FluentAutomation.F14N.Run(String name, Action`1 action)
----------------------------------------------------------------------
--------------------------------------------------------------------------
F14N-Fluent自动化控制台
-------------------------------------------------------------------------
1) 你好,谷歌
----------------------------------------------------------------------
无法解析类型:OpenQA.Selenium.IWebDriver
--------
WaitUntil(操作)内部引发了意外异常。看见
有关详细信息,请参阅InnerException。
在FluentAutomation.BaseCommandProvider.c__DisplayClass9.b__8()中
在FluentAutomation.BaseCommandProvider.Act(CommandType CommandType
,行动
在FluentAutomation.BaseCommandProvider.Waitill处(表达式'1 cond
(操作、时间间隔超时)
在FluentAutomation.BaseCommandProvider.Act(CommandType CommandType
,行动
位于FluentAutomation.CommandProvider.Navigate(Uri url)
位于FluentAutomation.ActionSyntaxProvider.Open(Uri url)
位于FluentAutomation.ActionSyntaxProvider.Open(字符串url)
提交时#0.b_uu2(IACTIONSYNTASI)
在ScriptCs.FluentAutomation.F14N.Run(字符串名,Action`1 Action)
----------------------------------------------------------------------
有人用过这个吗?我对使用脚本构建这些规范非常感兴趣。我遇到了类似的问题。您可能需要安装()
请确保在路径中设置driver.exe的位置当我没有安装指定的浏览器时遇到此异常 这是一个虚拟机,我以为有Chrome/Firefox/IE,但它只有IE。。。哎呀。安装了Chrome和Firefox,一切正常