Skip to content

Instantly share code, notes, and snippets.

Working from home

Nancy Schorr nmschorr

Working from home
Block or report user

Report or block nmschorr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Start Second Thread
protected WebDriver createDriver(Logger myLogger) throws AWTException, InterruptedException {
// the following 2 lines will dismiss the Windows crash alert dialog
AlertThread tAlertThread = new AlertThread("tAlertThread");
WebDriver localDriver = new FirefoxDriver(); // using this to see if bug goes away
localDriver.manage().timeouts().implicitlyWait(WAIT_TIME, TimeUnit.SECONDS); //for the entire test run
return localDriver;
View Threading example
class AlertThread extends Thread { // Dismiss the Firefox crash alert
public AlertThread (String tname) {
public void run(){
System.out.println("Inside run() of AlertThread method.");
try {
nmschorr / DismissFireFoxCrashAlert
Last active Sep 26, 2015
Dismiss FireFox crash alert brought on by Selenium.using JNA.
View DismissFireFoxCrashAlert
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.platform.win32.WinUser;
protected static void dismissFirefoxCrashAlert() {"Inside dismissFirefoxCrashAlert");
HWND hwnd = User32.INSTANCE.FindWindow (null, "Firefox"); // window title
if (hwnd == null) {
You can’t perform that action at this time.