Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/octogonapus/electronchromedriverbuilder
Builds chromedriver artifacts for use with Electron.jl
https://github.com/octogonapus/electronchromedriverbuilder
Last synced: 20 days ago
JSON representation
Builds chromedriver artifacts for use with Electron.jl
- Host: GitHub
- URL: https://github.com/octogonapus/electronchromedriverbuilder
- Owner: Octogonapus
- Created: 2022-12-05T20:59:45.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-03T15:57:39.000Z (over 1 year ago)
- Last Synced: 2024-12-15T13:14:01.356Z (24 days ago)
- Language: Julia
- Size: 11.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ElectronChromeDriverBuilder
This project builds [chromedriver](https://www.selenium.dev/documentation/webdriver/getting_started/install_drivers/) artifacts for use in Julia with [Electron.jl](https://github.com/davidanthoff/Electron.jl).
## Usage
Add these artifacts to your `Artifacts.toml` file following these docs: https://pkgdocs.julialang.org/v1/artifacts/
The tagging in this repo is the same as in [ElectronBuilder](https://github.com/davidanthoff/ElectronBuilder) so that you can match the tags.
It is important to use the proper version of `chromedriver` with Electron.jl.### Example Code
In Julia, open an Electron app:
```julia
using Electron
app = Application(additional_electron_args = ["--remote-debugging-port=7070", "--user-data-dir=/path/to/some/directory"])
win = Window(app, URI("file://main.html"))
```Then in Python, you can run Selenium:
```python
# Note: you must have the /path/to/chromedriver on your PATH!from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium import webdriverchrome_options = Options()
chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:7070")
driver = webdriver.Chrome(options=chrome_options)btn = driver.find_element(By.ID, "some-button")
print(btn)
btn.click()# don't close the driver because Julia manages the Electron process
# driver.close()
```