Skip to content

Commit

Permalink
Added basic GetAttribute test.
Browse files Browse the repository at this point in the history
Currently failing and I'm not sure why.
  • Loading branch information
grokys committed Apr 30, 2024
1 parent be5709c commit 6b4d3ab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/FlaUI.WebDriver.UITests/ElementTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,5 +210,17 @@ public void ActiveElement_Default_IsSupported()

Assert.That(activeElement.Text, Is.EqualTo("Invoked!"));
}

[TestCase(["Name", "Label"])]
public void GetAttribute_Label_ReturnsValue(string attributeName, string expectedValue)
{
var driverOptions = FlaUIDriverOptions.TestApp();
using var driver = new RemoteWebDriver(WebDriverFixture.WebDriverUrl, driverOptions);
var element = driver.FindElement(ExtendedBy.AccessibilityId("Label"));

var value = element.GetAttribute(attributeName);

Assert.That(value, Is.EqualTo(expectedValue));
}
}
}

0 comments on commit 6b4d3ab

Please sign in to comment.