0
votes

I am looking for steps to perform e2e testing using selenium, python for electron app.

  1. sample app to create and run in electron, vuejs.

    npm install electron --save-dev npm install -g @vue/cli vue create new-app vue add electron-builder

    launch app to test:

    npm run serve

    npm run electron:serve

  2. download chrome driver.

  3. create python (py) with following code:

    from selenium import webdriver

    from webdriver_manager.chrome import ChromeDriverManager

    driver = webdriver.Chrome(executable_path=r'C:/Users/ddd/Downloads/chromedriver_win32/chromedriver.exe')

    remote_app = webdriver.remote.webdriver.WebDriver( command_executor=f'http://localhost:9515', desired_capabilities = {'chromeOptions':{ 'binary': 'C:/Users/ddd/source/repos/vueselenium/new-app/node_modules/.bin/electron'}}, browser_profile=None, proxy=None, keep_alive=False)

    print("Page Title is : %s" %driver.title) driver.maximize_window() print(driver.title) driver.quit()

Not able to launch the electron app from this python file.
Thanks for your help.