using OpenQA.Selenium.Chrome;
using System.Threading.Tasks;
public void TestMethod1()
var expectedShops = new[] { "Shop1", "Shop2" };
ShopApiHelper.CreateShopsAsync(expectedShops);
var driver = new ChromeDriver();
driver.Navigate().GoToUrl("https://www.betsson.com/manageshops");
var showCreatedShopsButton = driver.FindElement(By.XPath("/toolbar/button[3]"));
Assert.IsTrue(showCreatedShopsButton.Displayed);
showCreatedShopsButton.Click();
var actualShops = driver.FindElements(By.XPath("/panel/div")).Select(_ => _.Text);
for (int i = 1; i <= expectedShops.Count(); i++)
Assert.AreEqual(actualShops.ElementAt(i), expectedShops[i]);
catch (HttpRequestException ex)
Console.WriteLine($"{ex.Message}");
public static class ShopApiHelper
public static async Task CreateShopsAsync(string[] shops) {