I have a a simple WebElement and I want to perform a series(one or more) of JS/JQuery type actions on my object.
Most of the time this is easy, I simply get the ID of the object, pass that into the “ExecuteScript” function, and viola works great:
RemoteWebDriver driver = ...; var element = driver.FindElementByXPath("..."); //Or any other type of lookup driver.ExecuteScript(@"$('#" + element.GetAttribute("id") + "')."DoSomeStuff...;");
I’ve yet to find a way to do this Universally for every element, how can this be done?
The above code will throw up an alert (and block your Selenium code), showing the element’s