Skip to content

Instantly share code, notes, and snippets.

View barancev's full-sized avatar

Alexei Barantsev barancev

View GitHub Profile
янв. 15, 2021 11:51:11 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 86.0a1, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20210114083245, moz:debuggerAddress: localhost:56988, moz:geckodriverVersion: 0.29.0, moz:headless: false, moz:processID: 24751, moz:profile: /var/folders/4h/wq4nzz4j5mz..., moz:shutdownTimeout: 60000, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: MAC, platformName: MAC, platformVersion: 20.2.0, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify}
янв. 15, 2021 11:51:11 AM org.openqa.selenium.remote.http.WebSocket$Listener onError
WARNING: Invalid Status code=200 text=OK
java.io.IOException: Invalid Status code=200 text=OK
at org.asynchttpclient.netty.handler.Web
static int[] array;
@BeforeClass
public static void prepare() {
array = new int[]{
1, 3, 5, 7, 9,
11, 13, 15, 17, 19,
21, 23, 25, 27, 29,
31, 33, 35, 37, 39,
41, 43, 45, 47, 49,
package xxx;
import static xxx.Section.PHOTOS;
import static xxx.Section.WALL;
public enum MethodAPI {
WALL_POST(WALL, "post"),
WALL_POST_EDIT(WALL, "edit"),
PHOTOS_UPLOAD_WALL(PHOTOS, "setWallUploadServer"),
PHOTOS_SAVE_WALL(PHOTOS, "saveWallPhoto");
import pytest
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
@pytest.fixture
def driver(request):
options = webdriver.EdgeOptions()
options.use_chromium = True
package ru.stqa.selenium;
import com.google.common.io.Files;
import net.lightbody.bmp.BrowserMobProxy;
import net.lightbody.bmp.BrowserMobProxyServer;
import net.lightbody.bmp.client.ClientUtil;
import org.junit.After;
import org.junit.Before;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
In [8]: driver = webdriver.Chrome()
DevTools listening on ws://127.0.0.1:56562/devtools/browser/fa154d4d-d612-4a2d-8f8d-9f72b58ddaa3
In [9]: driver.get("http://jsbin.com/")
In [10]: driver.switch_to.frame(driver.find_element_by_css_selector("#live iframe"))
In [11]: driver.switch_to.frame(driver.find_element_by_css_selector("iframe"))
C:\devel\selenium>c:\devel\homework\venv\Scripts\activate
(venv) C:\devel\selenium>ipython
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from selenium import webdriver
In [2]: driver = webdriver.Chrome()
Testing started at 21:24 ...
Gradle Daemon started in 1 s 739 ms
> Task :cleanTest
> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava
> Task :processTestResources
> Task :testClasses
> Task :test
from selenium import webdriver
from selenium.webdriver.support.select import Select
from selenium.common.exceptions import UnexpectedTagNameException
from selenium.webdriver.common.alert import Alert
import pytest
def test_without_isolation():
wd = webdriver.Chrome()
wd.get('https://www.selenium.dev/')
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Support.UI;
namespace addressbook_web_tests