Skip to content

docs(smartui): correct wrong APIs, stale version pins and broken CI config - #3266

Open
chaitanyas-maker wants to merge 1 commit into
LambdaTest:stagefrom
chaitanyas-maker:docs/smartui-api-correctness-fixes
Open

docs(smartui): correct wrong APIs, stale version pins and broken CI config#3266
chaitanyas-maker wants to merge 1 commit into
LambdaTest:stagefrom
chaitanyas-maker:docs/smartui-api-correctness-fixes

Conversation

@chaitanyas-maker

Copy link
Copy Markdown
Contributor

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 — javac against resolved SDK jars, the SmartUI CLI itself, PyYAML, and Maven Central metadata.

org.openqa.selenium.JavaScriptExecutor does not exist (22 occurrences, 6 pages)

Selenium's interface is JavascriptExecutor — lower-case s. javac against selenium-java 4.46.0 reports cannot 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-sdk was 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 contain SmartUIAppSnapshot at all — following it turns a working setup into cannot 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

  • --projectToken does not exist on upload-pdf. The CLI rejects it: error: unknown option '--projectToken'. Replaced with the real --pdfNames and --markBaseline, which were undocumented.
  • NO_PROXY is 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-results writes <build-id>.json, not results.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:

  • Java SDK options.put("element", webElement) — logs SmartUI snapshot failed, throws nothing, build completes with 0 snapshots on current stable 1.0.23
  • C# SDK element option — SmartUI API returns HTTP 500, the SDK swallows it, CaptureSnapshot returns normally
  • Puppeteer page's 12 smartuiSnapshot.smartuiSnapshot(...) calls — TypeError, build finishes "No snapshots processed"
  • Ruby SDK module is Lambdatest:: not LambdaTest:: — all 16 blocks NameError
  • Storybook backgroundTheme: "both" and useGlobals: true silently defeat theme switching

Happy to split this PR further if you would prefer the Java, CI and CLI changes reviewed separately.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant