-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ashi-psn/develop
fix ChromeOptionInitalization
- Loading branch information
Showing
13 changed files
with
106 additions
and
303 deletions.
There are no files selected for viewing
115 changes: 0 additions & 115 deletions
115
.swiftpm/xcode/xcshareddata/xcschemes/swift-webdriver.xcscheme
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
import SeleniumSwift | ||
import SwiftWebDriver | ||
|
||
print("Hello, world!") | ||
let chromeOption = try ChromeOptions( | ||
args: [ | ||
Args(.headless), | ||
] | ||
) | ||
|
||
let chromeOption = ChromeOptions( | ||
let selenium = SeleniumSwift(browser: .chrome(options: ChromeOptions()) | ||
let chromeDriver = try ChromeDriver( | ||
driverURLString: "http://localhost:9515", | ||
browserObject: chromeOption | ||
) | ||
|
||
let driver = WebDriver( | ||
driver: chromeDriver | ||
) | ||
|
||
Task.detached { | ||
do { | ||
let status = try await driver.status() | ||
print(status) | ||
let sessionId = try await driver.start() | ||
print(sessionId) | ||
try await driver.stop() | ||
} catch { | ||
print(error) | ||
} | ||
} |
This file contains 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
Oops, something went wrong.