This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net | |
import ( | |
"context" | |
"fmt" | |
"io" | |
"bufio" | |
"log" | |
"os" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Appium; | |
using OpenQA.Selenium.Appium.iOS; | |
using OpenQA.Selenium.Remote; | |
using OpenQA.Selenium.Support.UI; | |
namespace TestingBotAppiumSingleTest | |
{ | |
class MainClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'expect-puppeteer' | |
describe('Google', () => { | |
beforeAll(async () => { | |
await page.goto('https://google.com') | |
}) | |
it('should display "google" text on page', async () => { | |
await expect(page).toMatch('google') | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geckodriver -p 3031 --log trace | |
1574453509206 geckodriver DEBUG Listening on 127.0.0.1:3031 | |
1574453513007 webdriver::server DEBUG -> POST /session {"capabilities":{"firstMatch":[{"moz:firefoxOptions":{"androidPackage":"org.mozilla.firefox"}}]}} | |
1574453513007 mozdevice WARN adb server response contained hexstring length 98 and message length was 98 and message was "FA69L0313992 device usb:1-1 product:sailfish model:Pixel device:sailfish transport_id:7\n" | |
1574453513007 geckodriver::android DEBUG Android port forward (37267 -> 2829) started | |
1574453513008 mozdevice DEBUG execute_host_command: >> "host:transport:FA69L0313992" | |
1574453513008 mozdevice DEBUG execute_host_command: << [] | |
1574453513008 mozdevice DEBUG execute_host_command: >> "shell:cmd package resolve-activity --brief org.mozilla.firefox | tail -n 1" | |
1574453513156 mozdevice DEBUG execute_host_command: << "org.mozilla.firefox/.App\n" | |
1574453513156 mozdevice DEBUG execute_host_command: >> "host:transport:FA69L0313992" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Image GetEntireScreenshot() | |
{ | |
// Get the total size of the page | |
var totalWidth = (int) (long) ((IJavaScriptExecutor) driver).ExecuteScript("return document.body.offsetWidth"); //documentElement.scrollWidth"); | |
var totalHeight = (int) (long) ((IJavaScriptExecutor) driver).ExecuteScript("return document.body.parentNode.scrollHeight"); | |
// Get the size of the viewport | |
var viewportWidth = (int) (long) ((IJavaScriptExecutor) driver).ExecuteScript("return document.body.clientWidth"); //documentElement.scrollWidth"); | |
var viewportHeight = (int) (long) ((IJavaScriptExecutor) driver).ExecuteScript("return window.innerHeight"); //documentElement.scrollWidth"); | |
// We only care about taking multiple images together if it doesn't already fit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
echo "==========================================" | |
echo "======== Running prerun.bat file! ========" | |
echo "==========================================" | |
C:\test\wget.lnk --no-check-certificate "https://s3.amazonaws.com/xxx.jar" -O C:\test\mycode.jar | |
java -jar C:\test\mycode.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Selenium::Remote::Driver; | |
#Input capabilities | |
my $extraCaps = { | |
"browser" => "internet explorer", | |
"version" => "7", | |
"platform" => "Windows" | |
}; | |
my $key = "changeme"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HAI | |
OBTW WE'RE GOING TO CALCULATE PI TODAY USING AN APPROXIMATION ALGORITHM CONSISTING OF CALCULATING THE SUM OF | |
THE FOLLOWING SERIES: | |
4 * SUM OF [ (-1)^k k ∈ N | |
2*k + 1 ] | |
WE GO UP TO K=1000 | |
TLDR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'PHPUnit/Extensions/Selenium2TestCase.php'; | |
classGUITest extends \PHPUnit_Extensions_Selenium2TestCase { | |
public function __construct() { | |
$key = '[your api key]'; | |
$secret = '[your api secret]'; | |
$this->setHost("$key:[email protected]"); | |
$this->setPort(80); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Store */ | |
var elements = this.getDocument().getElementsByTagName('a'); | |
var links = []; | |
for (var i = 0; i < elements.length; i++) { | |
links.push(elements[i].href); | |
} | |
this.browserbot.createCookie("links", JSON.stringify(links)); |
NewerOlder