【发布时间】:2019-03-22 00:10:53
【问题描述】:
目前正在测试我们最近添加到项目中的 Excel 插件窗格。我想测试“创建工作表”文本的颜色。
public void ConfirmBtnText()
{
excelSession.FindElementByName("Home").Click();
excelSession.FindElementByXPath("//Button[@Name='AddIn button']").Click();
var getLabel = excelSession.FindElementByName("Create worksheet");
Assert.AreEqual("Create worksheet", getLabel.Text);
Assert.AreEqual("rgb(75, 79, 84)", getLabel.GetAttribute("Color")); // Fails here
}
错误提示:
预期:rgb(75, 79, 84)。实际:.
我应该如何在 Excel 插件窗格中测试元素的颜色?
感谢您的帮助。
这也失败了:
string cssProperty = getLabel.GetCssValue("Color");
出现错误:
OpenQA.Selenium.WebDriverException:意外错误。命令未实现:GET:/session/0CEE6663-DCBA-44E3-AC75-A7A5AF97DECA/element/42.525736.4.12/css/Color
【问题讨论】:
-
读到 Appium 不支持这种东西?
标签: c# excel appium coded-ui-tests winappdriver