Skip to content

Instantly share code, notes, and snippets.

View makolesnik's full-sized avatar

Maryna Kolesnik makolesnik

View GitHub Profile
@makolesnik
makolesnik / browsermob_capybara_chrome.rb
Last active May 11, 2021 16:03
Testing response with browsermob-proxy, capybara/selenium and chrome
require 'capybara'
require 'capybara/dsl'
require 'browsermob/proxy'
require 'selenium-webdriver'
include Capybara::DSL
# Download browsermob-proxy.
# Set JAVA_HOME for browsermob proxy
@makolesnik
makolesnik / capybara cheat sheet
Last active December 7, 2022 00:40 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Create driver=
include Capybara::DSL
Capybara.run_server = false
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, browser: :chrome)
end
Capybara.default_driver = :chrome
Capybara.app_host = "http://demoapp.strongqa.com"
=Resize Browser=
@makolesnik
makolesnik / !CalculatorTest.java
Last active February 22, 2023 00:05
Selenide + Appium for Android Calculator app
package test;
import org.openqa.selenium.By;
import org.testng.annotations.*;
import utilits.TestBase;
import static com.codeborne.selenide.Selenide.$;
import static com.codeborne.selenide.Condition.text;
@makolesnik
makolesnik / Selenide cheat sheet
Last active December 26, 2022 13:57
Selenide cheat sheet to create concise UI tests in Java. What is Selenide? Selenide is a wrapper for Selenium WebDriver. http://selenide.org/
=Navigating=
baseUrl = "http://site.com";
open("/login");
open("http://google.com");
switchTo().frame($("#myFrame").toWebElement());
=Alert=
switchTo().alert().accept();