Skip to content

Helium Press Method Implemented - #17

Merged
vimscientist69 merged 2 commits into
mainfrom
feat/helium-press-method
Jul 7, 2026
Merged

Helium Press Method Implemented#17
vimscientist69 merged 2 commits into
mainfrom
feat/helium-press-method

Conversation

@vimscientist69

@vimscientist69 vimscientist69 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Reason

This PR is created for issue #8

Tech Details List

  • Added chording method sendKeys() in SwiftWebDriver package. Updated this project packages.
  • Created press() method (for current active element of a driver and also AnyElement)
  • Created working integration tests for press() method
  • Refactored some shared integration tests code logic
  • Added documentation strings for press() method
  • Made sure all the new and old integration tests pass

Tasks:

  • Added chording method sendKeys() in SwiftWebDriver package. Updated this project packages.
  • Created press() method (for current active element of a driver and also AnyElement)
  • Created working integration tests for press() method
  • Refactored some shared integration tests code logic
  • Added documentation strings for press() method
  • Made sure all the new and old integration tests pass

Un-important tasks:

Links:

ISSUE-8
closes/resolves #8

Testing

Steps:

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

Output:

Building for debugging...
[18/18] Linking HeliumSwiftPackageTests
Build complete! (4.84s)
Test Suite 'All tests' started at 2026-07-01 20:43:09.468.
Test Suite 'All tests' passed at 2026-07-01 20:43:09.478.
	 Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.011) seconds
◇ Test run started.
↳ Testing Library Version: 6.3.2 (70eff261d7f462c)
↳ Target Platform: arm64-apple-macosx
◇ Suite "Press Method Integration Tests" started.
◇ Suite "Drag Method Integration Tests" started.
◇ Suite "`goTo Method Integration Tests" started.
◇ Suite "Start Browsers Integration Tests" started.
◇ Suite "Click Method Integration Tests" started.
◇ Suite "Double Click Method Integration Tests" started.
◇ Test "Test `startChrome` method" started.
◇ Test "Drag Element To Another" started.
◇ Test "Click on HeliumElement" started.
◇ Test "Test `goTo` method success cases" started.
◇ Suite "Write Method Integration Tests" started.
◇ Test "Double Click on HeliumElement" started.
◇ Test "Press Chord To Active Window" started.
◇ Test "Write To HeliumElement" started.
◇ Test case passing 1 argument url → "google.com" to "Test `goTo` method success cases" started.
2026-07-01T20:43:09+0200 info heliumswift.helium-integration-tests: to=ChromeStarter.createDriver() [HeliumSwift] Starting new Chrome driver.
2026-07-01T20:43:12+0200 info heliumswift.helium-integration-tests: to=ChromeStarter.startDriver(_:) [HeliumSwift] Started new Chrome driver success.
✔ Test "Press Chord To Active Window" passed after 3.668 seconds.
◇ Test "Press Chord To SwiftWebDriver Element" started.
✔ Test "Click on HeliumElement" passed after 3.930 seconds.
◇ Test "Click on SwiftWebDriver Element" started.
✔ Test "Drag Element To Another" passed after 4.131 seconds.
✔ Suite "Drag Method Integration Tests" passed after 4.132 seconds.
◇ Test case passing 1 argument url → "http://youtube.com" to "Test `goTo` method success cases" started.
2026-07-01T20:43:15+0200 info heliumswift.helium-integration-tests: to=ChromeStarter.createDriver() [HeliumSwift] Starting new Chrome driver.
✔ Test "Test `startChrome` method" passed after 6.385 seconds.
✔ Suite "Start Browsers Integration Tests" passed after 6.386 seconds.
✔ Test "Click on SwiftWebDriver Element" passed after 3.844 seconds.
✔ Suite "Click Method Integration Tests" passed after 7.775 seconds.
✔ Test "Press Chord To SwiftWebDriver Element" passed after 5.648 seconds.
✔ Suite "Press Method Integration Tests" passed after 9.317 seconds.
✔ Test "Write To HeliumElement" passed after 9.760 seconds.
◇ Test "Write To Active Window" started.
2026-07-01T20:43:19+0200 info heliumswift.helium-integration-tests: to=ChromeStarter.startDriver(_:) [HeliumSwift] Started new Chrome driver success.
✔ Test "Write To Active Window" passed after 2.704 seconds.
◇ Test "Write To SwiftWebDriver Element" started.
✔ Test "Double Click on HeliumElement" passed after 12.516 seconds.
◇ Test "Double Click on SwiftWebDriver Element" started.
✔ Test "Write To SwiftWebDriver Element" passed after 2.855 seconds.
✔ Suite "Write Method Integration Tests" passed after 15.320 seconds.
✔ Test "Double Click on SwiftWebDriver Element" passed after 3.077 seconds.
✔ Suite "Double Click Method Integration Tests" passed after 15.594 seconds.
◇ Test case passing 1 argument url → "https://instagram.com" to "Test `goTo` method success cases" started.
2026-07-01T20:43:26+0200 info heliumswift.helium-integration-tests: to=ChromeStarter.createDriver() [HeliumSwift] Starting new Chrome driver.
2026-07-01T20:43:28+0200 info heliumswift.helium-integration-tests: to=ChromeStarter.startDriver(_:) [HeliumSwift] Started new Chrome driver success.
✔ Test "Test `goTo` method success cases" with 3 test cases passed after 21.473 seconds.
◇ Test "Test `goTo` method failure cases - invalid urls - invalid schemes" started.
◇ Test case passing 1 argument urlComponent → ("ssh", "invalid-scheme") to "Test `goTo` method failure cases - invalid urls - invalid schemes" started.
◇ Test case passing 1 argument urlComponent → ("obsidian", "hyperlink-to-external-application") to "Test `goTo` method failure cases - invalid urls - invalid schemes" started.
◇ Test case passing 1 argument urlComponent → ("randomscheme", "invalid-scheme") to "Test `goTo` method failure cases - invalid urls - invalid schemes" started.
✔ Test "Test `goTo` method failure cases - invalid urls - invalid schemes" with 3 test cases passed after 6.061 seconds.
✔ Suite "`goTo Method Integration Tests" passed after 27.535 seconds.
✔ Test run with 13 tests in 7 suites passed after 27.536 seconds.

Testing QA

@vimscientist69
vimscientist69 merged commit 49f7690 into main Jul 7, 2026
0 of 3 checks passed
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 -> Helium.press() method

2 participants