-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Below is javascript for a custom pseudo selector which is being executed by IJavaScriptExecutor. This works well but I'm wondering if there is a way to globally apply custom JS functions to JQuery/Sizzle before a test is run so that in this example the selector ":icontains" doesn't need to be explicitly called.
//case insensitive pseudo selector
((IJavaScriptExecutor)FluentTest.ProviderInstance).ExecuteScript(
@"jQuery.expr[':'].icontains = function(a,i,m){
return jQuery(a).text().toUpperCase().indexOf(m[3].toUpperCase())>=0;};"
);
I.Find("span[class='select2-match']:icontains('ANYCase')");
Any thoughts on the best approach to make a custom JQuery function natively integrate into FluentAutomation's JQuery/Sizzle library?
Metadata
Metadata
Assignees
Labels
No labels