So I want to have filter for spans that have certain text. The jquery works find in console on chrome, but why when I use excuteScript it bring out System.FormatException: Input string was not in a correct format ?
JsExecutor.ExecuteScript(string.Format("$(\"h3:contains('{0}')\").closest(\"div.form-group-container\").find(\"span:contains('{1}')\")" +
".filter(function(){return $(this).text().toLowerCase()===\"{1}\";})" +
".closest(\"tr\").find(\"input\").click()", loonelementenType, excludedLoonelementen));
When debug I notice the .filter(function(){return $(this).text().toLowerCase()===\"{1}\";})
is the one that brought out System.FormatException