Skip to content

setAttribute() Method Implemented#49

Merged
vimscientist69 merged 1 commit intomasterfrom
feat/set-attribute-method
Aug 13, 2025
Merged

setAttribute() Method Implemented#49
vimscientist69 merged 1 commit intomasterfrom
feat/set-attribute-method

Conversation

@vimscientist69
Copy link

@vimscientist69 vimscientist69 commented Aug 12, 2025

Reason

Reason for creating this pull request: fixes #48

Tech Details List

  1. setAttribute() on ChromeDriver, updating all protocols (Driver and WebDriver) so that any new drivers in the future also require a setAttribute() implementation.
  2. Tests for setAttribute() method, getting the attribute value afterwards to see if the setAttribute() method actually changed the value of the attribute.

Tasks:

  • setAttribute() on ChromeDriver, updating all protocols (Driver and WebDriver) so that any new drivers in the future also require a setAttribute() implementation.
  • Tests for setAttribute() method, getting the attribute value afterwards to see if the setAttribute() method actually changed the value of the attribute.

Un-important tasks:

No tasks here.

Links:

ISSUE-48
closes/resolves #48

Testing

Steps:

  1. Run required commands to test all the code modified by this PR
# unit tests
# integration tests
npm run compose:build-and-up
swift build ; swift test --filter "ChromeDriverSetAttributeIntegrationTests"
# procs / testing logic
  1. Further testing can be done by following the notes in TESTING-QA

Output:

Swift test output:

╰─❯ swift build ; swift test --filter "ChromeDriverSetAttributeIntegrationTests"
❯ swift build ; swift test --filter "ChromeDriverSetAttributeIntegrationTests"
[1/1] Planning build
Building for debugging...
[9/9] Emitting module SwiftWebDriver
Build complete! (2.58s)
[1/1] Planning build
Building for debugging...
[6/6] Linking swift-webdriverPackageTests
Build complete! (3.73s)
Test Suite 'Selected tests' started at 2025-08-12 16:36:12.022.
Test Suite 'swift-webdriverPackageTests.xctest' started at 2025-08-12 16:36:12.033.
Test Suite 'swift-webdriverPackageTests.xctest' passed at 2025-08-12 16:36:12.033.
         Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'Selected tests' passed at 2025-08-12 16:36:12.033.
         Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.011) seconds
◇ Test run started.
↳ Testing Library Version: 124.4
↳ Target Platform: arm64e-apple-macos14.0
◇ Suite "Chrome Driver Set Attribute" started.
◇ Test "Set Attribute" started.
✔ Test "Set Attribute" passed after 3.485 seconds.
✔ Suite "Chrome Driver Set Attribute" passed after 3.485 seconds.
✔ Test run with 1 test passed after 3.485 seconds.

Testing QA

Make sure to run docker-compose up before running integration tests to start required services.

written integration tests, tests passed as expected
@vimscientist69 vimscientist69 self-assigned this Aug 12, 2025
@vimscientist69 vimscientist69 merged commit 4401f77 into master Aug 13, 2025
1 of 2 checks passed
@vimscientist69 vimscientist69 deleted the feat/set-attribute-method branch August 13, 2025 19:06
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.

Feature -> setAttribute() method to set attributes for specific elements

1 participant