thebrowsercompany / swift-webdriver

A Swift library for communicating with WebDriver (Appium/WinAppDriver) endpoints
BSD 3-Clause "New" or "Revised" License
101 stars 3 forks source link

Fix session test flakiness #65

Closed tristanlabelle closed 1 year ago

tristanlabelle commented 1 year ago

It would previously sporadically fail with:

Test Case 'SessionTests.testKeysAndAttributes' started at 2023-08-15 14:00:53.108
D:\a\webdriver-swift\webdriver-swift\Tests\WebDriverTests\SessionTests.swift:60: error: SessionTests.testKeysAndAttributes : XCTAssertEqual failed: ("true") is not equal to ("false") - Element still has keyboard focus

So I removed the expectation that submitting the search query changes the focus, since it was already under a sleep due to unreliability. Now it's based on a click. I also split the keys and attributes tests.