|
5 | 5 | import org.junit.Test; |
6 | 6 | import org.openqa.selenium.chrome.ChromeDriver; |
7 | 7 | import org.openqa.selenium.chrome.ChromeOptions; |
8 | | -import org.openqa.selenium.remote.DesiredCapabilities; |
9 | 8 | import pages.GoogleLandingPage; |
10 | 9 | import testUI.Configuration; |
11 | 10 | import testUI.Utils.GridTestUI; |
12 | 11 |
|
13 | | -import java.util.HashMap; |
14 | | -import java.util.Map; |
15 | | - |
16 | 12 | import static testUI.TestUIDriver.getSelenideDriver; |
17 | 13 | import static testUI.TestUIDriver.setDriver; |
18 | 14 | import static testUI.TestUIServer.stop; |
|
22 | 18 | import static testUI.Utils.By.*; |
23 | 19 | import static testUI.Utils.Performance.getListOfCommandsTime; |
24 | 20 | import static testUI.Utils.Performance.logAverageTime; |
25 | | -import static testUI.elements.TestUI.E; |
26 | 21 |
|
27 | 22 | public class TestBrowser { |
28 | 23 | private GoogleLandingPage googleLandingPage = new GoogleLandingPage(); |
@@ -167,35 +162,4 @@ public void testAndroidBrowserOneLine() { |
167 | 162 | .then("I find the submit").setElement(byCssSelector("[type=\"submit\"]")) |
168 | 163 | .and("I click on it").click(); |
169 | 164 | } |
170 | | - |
171 | | - @Test |
172 | | - public void testUIWithLoadero() { |
173 | | - |
174 | | - String linkId = "AbbzyH2Gl_dPBPk0"; |
175 | | - int participant = 1; |
176 | | - sleep(participant * 15 * 1000); |
177 | | - ChromeOptions options = new ChromeOptions(); |
178 | | - Map<String, Object> prefs = new HashMap<String, Object>(); |
179 | | - prefs.put("profile.default_content_setting_values.notifications", 1); |
180 | | - options.setExperimentalOption("prefs", prefs); |
181 | | - options.addArguments("no-sandbox"); |
182 | | - options.addArguments("use-fake-ui-for-media-stream"); |
183 | | - options.addArguments("use-fake-device-for-media-stream"); |
184 | | - ChromeDriver driver = new ChromeDriver(options); |
185 | | - setDriver(driver); |
186 | | - Configuration.testUILogLevel = LogLevel.DEBUG; |
187 | | - open("https://m.me/v/" + linkId); |
188 | | - E(byId("username")).sendKeys("Test"); |
189 | | - E(byCssSelector("._6z07")).waitFor(10).untilIsVisible().click(); |
190 | | - for (int i = 0; i < 10; i++) { |
191 | | - try { |
192 | | - E(byCssSelector("[aria-label=\"Mute microphone\"]")).waitFor(10).untilIsVisible().click(); |
193 | | - E(byCssSelector("[aria-label=\"Unmute microphone\"]")).waitFor(4).untilIsVisible(); |
194 | | - break; |
195 | | - } catch(Error e) { |
196 | | - System.out.println(e.getMessage()); |
197 | | - } |
198 | | - } |
199 | | - sleep(600000); |
200 | | - } |
201 | 165 | } |
0 commit comments