-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Description
Because our MVC solution is very big and we don't use the standard model-view approach we can test our ui more or less only in the classic way.
The good news is that Seleno has pretty good support for this use-case but some functions are missing.
For example the Input() method on the generic Page<...> object offers things I would really like use in the non-generic version.
For that I created an extension for the IExecutor interface.
I will left it here for review, plrease tell me if my approach is correct or if that stuff already exists (and I'm blind).
Thanks
public static class ExecutorExtensions
{
public static void SetValue(this IExecutor executor, By.jQueryBy by, string value)
{
executor.ExecuteScript(string.Format("${0}.val('{1}');", by.Selector, value));
}
public static void SetText(this IExecutor executor, By.jQueryBy by, string value)
{
executor.ExecuteScript(string.Format("${0}.text('{1}');", by.Selector, value));
}
public static void SetAttribute(this IExecutor executor, By.jQueryBy by, string name, string value)
{
executor.ExecuteScript(string.Format("${0}.attr('{1}', '{2}');", by.Selector, name, value));
}
}Metadata
Metadata
Assignees
Labels
No labels