This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 157810 [details] project for reproducing the bug In the attached project, please test file "ExternalWebView". It causes an error with stacktrace: java.lang.IllegalStateException: No presenter active. Use BrwsrCtx.execute! at com.dukescript.test.selenium.webdriver.DukeScriptBrowser.findElementById_impl(DukeScriptBrowser.java) at com.dukescript.test.selenium.webdriver.DukeScriptBrowser.findElementById(DukeScriptBrowser.java:156) at org.openqa.selenium.By$ById.findElement(By.java:218) at com.dukescript.test.selenium.webdriver.DukeScriptBrowser$3.run(DukeScriptBrowser.java:141) at net.java.html.BrwsrCtx$1Wrap.run(BrwsrCtx.java:177) at net.java.html.BrwsrCtx.execute(BrwsrCtx.java:186) As you can see from StackTrace, it has been called from BrwsrCtx.execute.
Looks like this is real bug! Executor should be registered in BrwsrCtx, but it is not: you can workaround by building new context yourself and putting all the technologies there + the Executor.
http://hg.netbeans.org/html4j/rev/e390a06dbfac
The fix will be part of 1.3 version. Here is fix of your code that works with current version 1.2.3: --- a/src/test/java/com/dukescript/test/selenium/webdriver/ExternalWebView.java +++ b/src/test/java/com/dukescript/test/selenium/webdriver/ExternalWebView.java @@ -22,7 +22,6 @@ * <http://www.gnu.org/licenses/gpl-3.0.html>. * #L% */ -import java.util.List; import java.util.concurrent.CountDownLatch; import java.util.logging.Level; import java.util.logging.Logger; @@ -48,12 +47,17 @@ @BeforeClass public static void test() throws InterruptedException, Exception { final CountDownLatch countDownLatch = new CountDownLatch(1); - + final WebView[] arr = { null }; final Runnable done = new Runnable() { @Override public void run() { testModel = new TestModel("Hello", "World"); testModel.applyBindings(); + try { + driver = new WebDriverFX(arr[0]); + } catch (Exception ex) { + Logger.getLogger(ExternalWebView.class.getName()).log(Level.SEVERE, null, ex); + } countDownLatch.countDown(); } }; @@ -63,11 +67,11 @@ try { Stage stage = new Stage(); final WebView webView = new WebView(); + arr[0] = webView; Scene scene = new Scene(webView); stage.setScene(scene); stage.show(); FXBrowsers.load(webView, ExternalWebView.class.getResource("testWithModel.html"), done); - driver = new WebDriverFX(webView); } catch (Exception ex) { Logger.getLogger(ExternalWebView.class.getName()).log(Level.SEVERE, null, ex); }