Still not working well but a lot more does

This commit is contained in:
2023-04-27 11:18:53 +02:00
parent d1eb1720a2
commit 23de653bde
5 changed files with 137 additions and 39 deletions
+16 -6
View File
@@ -148,12 +148,22 @@ namespace Test_Merge
actions.SendKeys(OpenQA.Selenium.Keys.Space).Perform();
Thread.Sleep(1000);
//Clicks on the settings Icon
IWebElement settingsButton = Driver.FindElement(By.ClassName("bmpui-ui-settingstogglebutton"));
settingsButton.Click();
IWebElement selectElement = Driver.FindElement(By.ClassName("bmpui-ui-videoqualityselectbox"));
SelectElement select = new SelectElement(selectElement);
IWebElement selectOption = selectElement.FindElement(By.CssSelector("option[value^='1080_']"));
selectOption.Click();
try
{
IWebElement settingsButton = Driver.FindElement(By.ClassName("bmpui-ui-settingstogglebutton"));
settingsButton.Click();
IWebElement selectElement = Driver.FindElement(By.ClassName("bmpui-ui-videoqualityselectbox"));
SelectElement select = new SelectElement(selectElement);
IWebElement selectOption = selectElement.FindElement(By.CssSelector("option[value^='1080_']"));
selectOption.Click();
}
catch
{
//Sometimes it can crash because it could not get the options to show up in time. When it happens just retry
Driver.Dispose();
return 105;
}
//Makes the feed fullscreen
WebDriverWait wait = new WebDriverWait(Driver, TimeSpan.FromSeconds(10));