我的目的是通过在关键字中给出它并将其作为测试用例来传递多个URL作为参数。它应该是多个测试用例的一部分。请帮我纠正代码。
*** settings ***
Library Selenium2Library
Test Template My Logging
*** Variables ***
${Google} https://www.google.co.in/
${Facebook} https://www.facebook.com/
*** Test Cases ***
Login to Google
My Logging ${Google}
My Logging ${Facebook}
Login to Google website
Login to Google
*** Keywords ***
My Logging
[Arguments] ${url}
Open Browser ${url} Chrome
Capture Page Screenshot
Close Browser
Login to google
Open Browser ${Google} Chrome
Close Browser
Login to Google website | FAIL |
WebDriverException: Message: unknown error: unhandled inspector error: {"code":-32603,"message":"Cannot navigate to invalid U
RL"}
答案 0 :(得分:4)
您不能将 private void scrollWb() {
string command = "window.scrollTo(0, document.body.scrollHeight);";
using (Gecko.AutoJSContext context = new AutoJSContext(wb.Window.JSContext))
{
var result = context.EvaluateScript(command, wb.Window.DomWindow);
}
用于非数据驱动的测试。删除这一行:
Test Template