Releases: zninggo/selenium
Releases · zninggo/selenium
Release list
v0.12.0
v0.12.0 — Shadow DOM
iframe(原本就有)
SwitchFrame(frame):按 id / WebElement /nil切换浏览上下文
Shadow DOM(新增)
host, err := wd.FindElement(selenium.ByID, "host")
root, err := host.GetShadowRoot()
btn, err := root.FindElement(selenium.ByID, "inner-btn")
btn.Click()- 仅 open shadow root(W3C / ChromeDriver)
- 端点:
GET .../element/{id}/shadow,查找.../shadow/{id}/element[s]
验证
- 本地 Chromium + ChromeDriver 150 headless:
TestSmokeChromePASS(含 shadow) - 光 DOM 找不到内部节点,经
GetShadowRoot可找可点
go get github.com/zninggo/selenium@v0.12.0
v0.11.1
v0.11.1 — Chinese README
- New README.zh-CN.md (简体中文)
- Language switcher on both READMEs:
- English:
Language: English | 简体中文 - 中文:
语言:English | 简体中文
- English:
go get github.com/zninggo/selenium@v0.11.1
v0.11.0
v0.11.0 — CDP + optional browser CI
CDP
WebDriver.ExecuteCDPCommand(cmd, params)→ ChromeDriverPOST /session/{id}/goog/cdp/execute- No extra dependencies (raw cmd + params)
TestSmokeChromechecksBrowser.getVersionwhen Chrome is presentExample_cdpinexample_test.go
res, err := wd.ExecuteCDPCommand("Browser.getVersion", nil)
// res is map[string]interface{} with product, userAgent, ...Browser CI
- New workflow: browser (Actions → browser → Run workflow)
- Also weekly schedule; downloads Chrome for Testing then runs smoke
- Default ci workflow unchanged (fast, no forced browser download)
go get github.com/zninggo/selenium@v0.11.0
v0.10.8
v0.10.8 — docs and modern examples
- README: migrate to
@v0.10.7+, URL prefix cheat sheet, fork behavior notes ExampleChromeDriver: ChromeDriver 115+ root URL (no/wd/hub)Example_selenium4:NewSeleniumServiceV4root URL- Legacy Selenium 3
Examplekept for/wd/hub
go get github.com/zninggo/selenium@v0.10.8
v0.10.7
v0.10.7 — smoke test read-back fix
TestSmokeChromeverifies typed text viaGetProperty("value")(headless Chrome attribute was empty on CI)- Includes
v0.10.6smoke coverage: session, W3C find, SendKeys, cookie, CurrentURL, teardown - ChromeDriver tests use root URL (not
/wd/hub)
go get github.com/zninggo/selenium@v0.10.7
go test -mod=mod -count=1 -timeout=5m -run TestSmokeChrome -v
v0.10.6
v0.10.6 — Chrome smoke test
TestSmokeChrome: main-path regression against real ChromeDriver when present- session (root URL, W3C caps)
ByID/ByClassNameSendKeys- cookie add/get
CurrentURL/TitleQuit+Service.Stop
- Skips when chromedriver/Chrome are missing (default CI stays green)
- Fix ChromeDriver direct integration tests to use root URL, not
/wd/hub
go get github.com/zninggo/selenium@v0.10.6
cd vendor && go run init.go --alsologtostderr --download_browsers && cd ..
go test -mod=mod -count=1 -timeout=5m -run TestSmokeChrome -v
v0.10.5
v0.10.5 — remaining upstream bugfixes from open issues/PRs
- Set
Content-Type: application/jsonon requests with a body (PR tebeka#153/tebeka#274; WinAppDriver etc.) - W3C
SendKeyssends bothtextandvaluestring list (issue tebeka#199) - Cookie
Path/Domain/Secure/HTTPOnlyomitempty (PR tebeka#283 / tebeka#130 family) - Fix internal wire cookie
sameSiteJSON tag NewSeleniumServiceonly passes-debugwhenSetDebug(true)(issue tebeka#193)
go get github.com/zninggo/selenium@v0.10.5
v0.10.4
v0.10.4 — multi-OS browser downloads
vendor/init.goselects assets byGOOS/GOARCH(linux64, mac-x64, mac-arm64, win32, win64)- Chrome / ChromeDriver from Chrome for Testing Stable API
- Firefox / geckodriver / Sauce Connect packages matched per platform
- Unsupported platforms error clearly instead of downloading Linux-only URLs
- Dropped
cloud.google.com/gousage from the init helper - HTMLUnit tests skip when
javais not on PATH
go get github.com/zninggo/selenium@v0.10.4
cd vendor && go run init.go --alsologtostderr --download_browsers --download_latest
v0.10.3
v0.10.3 — Linux orphan process cleanup
- Service / Xvfb children: process group +
Pdeathsig=SIGKILLon Linux Stopkills the process group; failedstarttears down half-started processes- Sauce Connect: enable
PdeathsigwhenQuitProcessUponExitis set (platform-specific)
go get github.com/zninggo/selenium@v0.10.3
v0.10.2
v0.10.2 — W3C find mapping + Selenium 4 service
- W3C mode maps:
ByID→#idByName→[name="..."](was onlyinput[name=...])ByClassName→[class~="..."]
- New
NewSeleniumServiceV4(jarPath, port, opts...)for Selenium 4+ standalone- Listens at
http://localhost:<port>(no/wd/hub) - Use that URL as
NewRemoteurlPrefix
- Listens at
go get github.com/zninggo/selenium@v0.10.2
Selenium 4 example
svc, err := selenium.NewSeleniumServiceV4("selenium-server-4.x.jar", 4444)
// ...
wd, err := selenium.NewRemote(caps, "http://localhost:4444")