diff --git a/test/sanity/window-isdevtoolsopen/index.html b/test/sanity/window-isdevtoolsopen/index.html new file mode 100644 index 0000000000..79b05d877b --- /dev/null +++ b/test/sanity/window-isdevtoolsopen/index.html @@ -0,0 +1,22 @@ + + + + + + nw.Window.isDevToolsOpen fixture + + + +
+ win.isDevToolsOpen: + +
+ + diff --git a/test/sanity/window-isdevtoolsopen/package.json b/test/sanity/window-isdevtoolsopen/package.json new file mode 100644 index 0000000000..f2e85db4d4 --- /dev/null +++ b/test/sanity/window-isdevtoolsopen/package.json @@ -0,0 +1,4 @@ +{ + "name": "window-isdevtoolsopen", + "main": "index.html" +} diff --git a/test/sanity/window-isdevtoolsopen/test.py b/test/sanity/window-isdevtoolsopen/test.py new file mode 100644 index 0000000000..85639ea2bd --- /dev/null +++ b/test/sanity/window-isdevtoolsopen/test.py @@ -0,0 +1,15 @@ +import os +import platform +import time + +from selenium import webdriver +from selenium.webdriver.chrome.options import Options +chrome_options = Options() +chrome_options.add_argument("nwapp=" + os.path.dirname(os.path.abspath(__file__))) + +driver = webdriver.Chrome(executable_path=os.environ['CHROMEDRIVER'], chrome_options=chrome_options, service_log_path="log", service_args=["--verbose"]) +try: + result = driver.find_element_by_id('isdevtoolsopen').get_attribute('textContent') + assert(result == 'true') +finally: + driver.quit()