【发布时间】:2021-11-08 18:45:46
【问题描述】:
Browserstack 使用这个 uri http:/hub-cloud.browserstack.com/wd/hub。在本地我使用http://xxx.xxx.xx.xxx:xxxx/wd/hub。我尝试将它们放入,但出现错误我还尝试使用 Browserstack(这是 Browserstack 设置代码)为 FI 获取布尔值,所以我有以下内容。 if(位置)应该是什么
if (Location)
{
var foundElement = (_IOSdriver.FindElementsByXPath(elementXPath));
Assert.IsNotNull(foundElement);
// Browserstack Check;
}
else
{
IReadOnlyList<IOSElement> allTextViewElements =
_IOSdriver.FindElementsByXPath(elementXPath);
//Setting the status of test as 'passed' or 'failed' based on the condition if results are found for the search
if ((allTextViewElements.Count > 0))
{
((IJavaScriptExecutor)_IOSdriver).ExecuteScript("browserstack_executor: {\"action\": \"setSessionStatus\", \"arguments\": {\"status\":\"passed\", \"reason\": \" Results found! \"}}");
}
else
{
((IJavaScriptExecutor)_IOSdriver).ExecuteScript("browserstack_executor: {\"action\": \"setSessionStatus\", \"arguments\": {\"status\":\"failed\", \"reason\": \" Results not found!\"}}");
}
【问题讨论】:
标签: c# appium browserstack