I'm trying click on button which has attribute:
href = javascript:window.print()
So, when I'm trying click on it there is a page with preview data for print (as I understood the 'javascript:window.print()' causes print window)
as i understood 'click()' of IWebElement (OpenQA.Selenium) waiting for page to load or something else and then automation test shut down with
http request timed out webdriver exception
I'm tryed use click of OpenQA.Selenium.Interactions// IwebElement Click()// and javascript click () there are same result with http request timed out error
element attribute: <button class='className' href = 'javascript:window.print()' /button>
And I tryed:
element = driver.findElement(By.Class('className'));
(1) first case:
element.Click(); // as IWebDriver standart method
(2) second case:
Actions action = new Actions(driver);
action.MoveToElement(element).Click().Perform();
and third case: (3)
Browser.ExecuteJavaScript("(document.getElementByClassName('className'))[0].click();")