Skip to content

Instantly share code, notes, and snippets.

View gist:0c2f263b33c100bcbd7cfc3d6597ba59
// Bad example of static variable, In this case the
// driver instance can be accessed by multiple threads and
// potentially can be changed by multiple threads.
// This results into an unexpected behaviour at runtime when
// this code runs in parallel
class WebDriverContainer
public static WebDriver driver; // No thread safety
virenv / gist:6a24b4fb882e47540d148c4581e6e5ea
Created Jul 28, 2018
A small change to apply retry when a pop up appears
View gist:6a24b4fb882e47540d148c4581e6e5ea
public class ElementProxy implements InvocationHandler {
private final WebElement element;
public ElementProxy(WebElement element) {
this.element = element;