How can I ask the Selenium-WebDriver to wait for few seconds in Java?

Well, there are two types of wait: explicit and implicit wait. The idea of explicit wait is WebDriverWait.until(condition-that-finds-the-element); The concept of implicit wait is driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); You can get difference in details here. In such situations I’d prefer using explicit wait (fluentWait in particular): public WebElement fluentWait(final By locator) { Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)… Read More How can I ask the Selenium-WebDriver to wait for few seconds in Java?

How do I revert all local changes in Git managed project to previous state

If you want to revert all changes AND be up-to-date with the current remote master (for example you find that the master HEAD has moved forward since you branched off it and your push is being ‘rejected’) you can use: # will fetch the latest changes on the remote git fetch # will set your… Read More How do I revert all local changes in Git managed project to previous state

Git tips and tricks:: How to undo a git merge with conflicts

Latest Git: git merge –abort This attempts to reset your working copy to whatever state it was in before the merge. That means that it should restore any uncommitted changes from before the merge, although it cannot always do so reliably. Generally you shouldn’t merge with uncommitted changes anyway. Prior to version 1.7.4: git reset… Read More Git tips and tricks:: How to undo a git merge with conflicts

Sass Variables

Variables in Sass can be seen as simple versions of symbols in Fireworks or Illustrator, or as Smart objects in Photoshop; the most basic way of making a value appear in multiple places while still being able to update it where it was defined. It prevents you from having to search through your code, trying… Read More Sass Variables