Category: <span>Tips</span>

Smart click (part 3)

In this part I decided to show some examples of using the SmartClick() method just to make the way it works easier to understand. Example 1 – the simplest. In 99% of cases you can use it without any parameters just like an IWebElement interface extension method: public void GoogleSearch() { IWebDriver driver = new FirefoxDriver(); driver.Navigate().GoToUrl(“http://www.google.com”); IWebElement query, btnSearch; WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(5)); query = driver.FindElement(By.Name(“q”)); query.Clear(); query.SendKeys(“selenium”); btnSearch = driver.FindElement(By.Name(“btnG”)); btnSearch.SmartClick(); wait.Until((d) => { return d.Title.StartsWith(“selenium”); }); Assert.AreEqual(“selenium – Google Search”, driver.Title); } In this case SmartClick works like native method Click() with some additional functionalities, such …

Adjustment of testing environment via Registry

Sometimes  you have to adjust parameters of your testing environment before running your tests. It may be some security settings, turning on or off some plug-ins, settings of browsers or other applications. As an example let’s look at the settings of Internet Explorer browser. Using this browser many automation testers often face with the following error: “Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (NoSuchDriver)” This error occurs when Protected  Mode for different zones are not the …

How to handle Mixed Content blocker in Firefox via WebDriver

In new version of Firefox, recently I encountered mixed content blocker where page given in specific frame was not loading. I noticed on the top of the screen in latest Firefox there is an icon on the top of the screen What is Mixed Content? You can find very detailed explanation on Mozilla support page but just for quick explanation if you don’t want to read there: “HTTP is not encrypted but HTTPS and if you have a http content into HTTPS page then there are chances that your content can be hacked and its known as Mixed content” How …


Notice: Undefined offset: 0 in /home/chyqruxavcln/public_html/learnseleniumtesting.com/wp-content/plugins/cardoza-facebook-like-box/cardoza_facebook_like_box.php on line 924