public class ThreadedSelectWindow
extends java.lang.Thread
Constructor and Description |
---|
ThreadedSelectWindow(java.lang.Thread caller,
com.thoughtworks.selenium.Selenium server,
java.lang.String id,
long timeout_seconds)
Intended usage:
ThreadedSelectWindow selectWindow =
new ThreadedSelectWindow(Thread.currentThread(), selenium, id, timeout);
try{
selectWindow.start();
Thread.sleep((timeout * 1000)+ 1000); //backup timeout for deadlocks
} catch (Exception e){}
if(selectWindow.isSearching()){
Log.debug("SGU: Selenium.selectWindow thread may have deadlocked after "+
selectWindow.searchSeconds() +" seconds.");
}
return selectWindow.isSelected();
|
Modifier and Type | Method and Description |
---|---|
boolean |
isSearching() |
boolean |
isSelected() |
void |
run()
Implements the Runnable Interface.
|
long |
searchSeconds() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public ThreadedSelectWindow(java.lang.Thread caller, com.thoughtworks.selenium.Selenium server, java.lang.String id, long timeout_seconds)
caller
- -- Thread to be interrupted upon successful run()--the calling Thread.server
- -- Selenium object on which to invoke threaded selectWindowid
- -- id of browser window object to select -- can be nulltimeout_seconds
- -- timeout in seconds to attempt the searchpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public boolean isSelected()
public boolean isSearching()
public long searchSeconds()
Copyright © SAS Institute. All Rights Reserved.