Unable to run JavaScript in IE using Selenium
You should try to find element using selenium script and need to paas it as an arguments to ExecuteScript()
as below :-
string script = "arguments[0].remove();";
IWebElement element = Driver.WebDriver.FindElement(By.ClassName("ITLCover"));
((IJavaScriptExecutor) Driver.WebDriver).ExecuteScript(script, element);
Edited :- If you want to pass list of IWebElement
, and perform script using index
, try as :-
int index = 0;
string script = "arguments[0][arguments[1]].remove();";
((IJavaScriptExecutor) Driver.WebDriver).ExecuteScript(script, Driver.WebDriver.FindElements(By.ClassName("ITLCover")), index);
make Selenium not think something is loading in IE
Try once using Actions
asActions act = new Actions(driver); act.sendKeys(element, "Testingusername");
Related Topics
Encrypt Data Bag from Inside of Ruby Without Relying on Knife
Why Use Gems for Serving Assets Instead of the Vendor File
Rails Migration Complains About Undefined Method 'Attachment' Using Paperclip
Invalid Source Reflection MACro :Has_Many :Through
Hook Before All Delyed Job Success Callback to Save Successfully Completed Jobs
How to Return a Group of Sequential Numbers That Might Exist in an Array
Managing Conflicting Versions of Ruby Gems
How to Escape All Characters with Special Meaning in Regex
On Destroying Session via Devise "Couldn't Find User with 'Id'=Sign_Out"
Rspec: How to Write Unit Test Case to Receive an Exception Which Is Getting Raised in Private Method
Ruby Devise, Sessionscontroller.Create, JSON - Getting Nameerror: Undefined 'Build_Resource'
Render Erb from Database into View Problem Please Help!
Rails 3 - Has_And_Belongs_To_Many
What Ruby Features Are Used in Chef Recipes