docs(smartui): correct wrong APIs, stale version pins and broken CI config - #3266
Open
chaitanyas-maker wants to merge 1 commit into
Open
Conversation
Second batch from the documentation verification sweep. Where the first PR (LambdaTest#3264) fixed snippets that could not parse, this one fixes snippets that parse but are wrong. Java: org.openqa.selenium.JavaScriptExecutor does not exist - Selenium's interface is JavascriptExecutor (lower-case s). javac reports "cannot find symbol" and it breaks three complete copy-pasteable classes. Corrected in 6 SmartUI pages, 22 occurrences. C# IJavaScriptExecutor uses are correct and were left alone. Maven pins: lambdatest-java-sdk was pinned at 1.0.2, 1.0.7, 1.0.8 and 1.0.18 across four pages against a current stable of 1.0.23 (verified against Maven Central metadata). The Appium troubleshooting step told readers to pin 1.0.2, which does not contain SmartUIAppSnapshot at all and would break a working setup. All five now pin 1.0.23. CI YAML: five snippets nested "- run:" as a second list item under "- name:", so they were not parseable YAML. All five now parse. Stray trailing double quotes (15 occurrences across 8 CI and PDF pages), e.g. BUILD_NAME: ...$(Build.SourceVersion)" and - 18". Same corruption family as the missing-opening-quote defects in LambdaTest#3264. CLI reference: --projectToken does not exist on upload-pdf (the CLI rejects it with "unknown option"); replaced with the real --pdfNames and --markBaseline. NO_PROXY is documented but appears zero times in the CLI bundle - replaced with the proxy variables the CLI actually reads. --fetch-results writes <build-id>.json, not results.json. Every claim here was verified by running the real toolchain: javac against the resolved SDK jars, the SmartUI CLI itself, and Maven Central metadata. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0197inyHsQ3V3CxPicLLvFJy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch from the documentation verification sweep. #3264 fixed snippets that could not parse; this one fixes snippets that parse but are wrong.
Everything below was verified by running the real toolchain —
javacagainst resolved SDK jars, the SmartUI CLI itself, PyYAML, and Maven Central metadata.org.openqa.selenium.JavaScriptExecutordoes not exist (22 occurrences, 6 pages)Selenium's interface is
JavascriptExecutor— lower-cases.javacagainst selenium-java 4.46.0 reportscannot find symbol: class JavaScriptExecutor, and it breaks three complete copy-pasteable classes.Fixed in
smartui-selenium-java-sdk,smartui-playwright-java-sdk,smartui-pdf-java-sdk,smartui-appium-hooks,smartui-handle-lazy-loading,smartui-gitlab-pr-checks-hooks.C# uses
IJavaScriptExecutor(capital S is correct in .NET) — those were deliberately left untouched.Stale and inconsistent Maven pins
lambdatest-java-sdkwas pinned at 1.0.2, 1.0.7, 1.0.8 and 1.0.18 across four pages. Current stable is 1.0.23 (confirmed from Maven Central metadata).Worst case: the Appium troubleshooting step told readers to pin
1.0.2, which does not containSmartUIAppSnapshotat all — following it turns a working setup intocannot find symbol.Five CI YAML snippets did not parse
- run:was nested as a second list item under- name:. PyYAML:expected <block end>, but found '-'. Pasting them into a pipeline fails at the parser.All five now parse cleanly (verified after the change).
15 stray trailing double quotes across 8 pages
BUILD_NAME: ...$(Build.SourceVersion)",- 18",branches: main develop",- npx smartui exec -- <command">, and others across the Azure, Bitbucket, Buildkite, CircleCI, GitLab, Semaphore, Travis and PDF CLI pages. Same corruption family as the missing-opening-quote defects in #3264.CLI reference corrections
--projectTokendoes not exist onupload-pdf. The CLI rejects it:error: unknown option '--projectToken'. Replaced with the real--pdfNamesand--markBaseline, which were undocumented.NO_PROXYis a silent no-op — the string appears zero times in the CLI bundle in both 5.0.0 and the published 4.1.74. Replaced with the proxy variables the CLI actually reads (SMARTUI_HTTP_PROXY,SMARTUI_HTTPS_PROXY,SMARTUI_API_PROXY).--fetch-resultswrites<build-id>.json, notresults.json— verified live.Not included here
The sweep found substantially more, including several silent failures where a documented feature no-ops while the test still passes. Those need product decisions rather than a docs edit, so I am filing them separately:
options.put("element", webElement)— logsSmartUI snapshot failed, throws nothing, build completes with 0 snapshots on current stable 1.0.23elementoption — SmartUI API returns HTTP 500, the SDK swallows it,CaptureSnapshotreturns normallysmartuiSnapshot.smartuiSnapshot(...)calls —TypeError, build finishes "No snapshots processed"Lambdatest::notLambdaTest::— all 16 blocksNameErrorbackgroundTheme: "both"anduseGlobals: truesilently defeat theme switchingHappy to split this PR further if you would prefer the Java, CI and CLI changes reviewed separately.