Skip to content

Instantly share code, notes, and snippets.

View shapovalovei's full-sized avatar
🎯
Focusing on TrueAutomation.OI

Eugene Shapovalov shapovalovei

🎯
Focusing on TrueAutomation.OI
View GitHub Profile
""" This program that could take a big log file and make a "single narrative" where text is not repeated """
import sys
import re
def parse_content(src):
"""Get only content(message) from log file"""
return re.split(r'\((.*)\) ', src).pop()
objc[47074]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.j
dk/Contents/Home/jre/bin/java (0x10f6784c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents
/Home/jre/lib/libinstrument.dylib (0x10f7724e0). One of the two will be used. Which one is undefined.
Running TestSuite
15:33:54: Starring suite: Suite
15:33:55:
15:33:55: Starring test: feature
15:33:55:
15:34:06:
15:34:06: ******************************* STARTING APPIUM SERVICE ********************************
Failed scenarios: payingViaPayPal.feature:10 # Scenario: Pay with PayPal
1 Scenarios (1 failed)
13 Steps (1 failed, 8 skipped, 4 passed)
0m43.836s
org.openqa.selenium.JavascriptException: Element does not exist in cache (status: 10) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 516 milliseconds
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'MacBook-Pro-Eugene.local', ip: '172.16.5.52', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_121'
<properties>
<selenium.version>3.0.1</selenium.version>
<selendroid.version>0.17.0</selendroid.version>
<aspectj.version>1.8.9</aspectj.version>
<allure.version>1.5.0</allure.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<name>Moovweb Automation framework</name>
@CucumberOptions(
features = "src/test/resources/feature/",
glue = "steps",
tags = "@testdiary1")
class CukesRunnerTest extends AbstractTestNGCucumberTests {
}

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
[HTTP] --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"showXcodeLog":true,"platformVersion":"10.2","xcodeOrgId":"Y95G5M3Q84","automationName":"XCUITest","useNewWDA":true,"browserName":"Safari","platformName":"iOS","udid":"f2b87b1ace53f97344a6c46ba67f33c60fb46cd1","deviceName":"iPhone 6","launchTimeout":500000,"xcodeSigningId":"iPhone Developer","wdaLocalPort":8111},"requiredCapabilities":{}},"desiredCapabilities":{"showXcodeLog":true,"platformVersion":"10.2","xcodeOrgId":"Y95G5M3Q84","automationName":"XCUITest","useNewWDA":true,"browserName":"Safari","platformName":"iOS","udid":"f2b87b1ace53f97344a6c46ba67f33c60fb46cd1","deviceName":"iPhone 6","launchTimeout":500000,"xcodeSigningId":"iPhone Developer","wdaLocalPort":8111},"requiredCapabilities":{}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"showXcodeLog":true,"platformVersion":"10.2","xcodeOrgId":"Y95G5M3Q84","automationName":"XCUITest","useNewWDA":true,"browserName":"Safari","platformName":"iOS","udid":"f2b87b1ace5
@shapovalovei
shapovalovei / DriverFactory.java
Created April 27, 2017 09:58
Start Appium Service
/**
* Function for creating appium service
*/
private static void startAppiumService() {
if (service == null) {
int appiumPort = Integer.parseInt(Config.APPIUM_PORT);
int proxyPort = Integer.parseInt(Config.PROXY_PORT);
if (Config.PLATFORM_NAME.equals("iOS")) {
[HTTP] --> POST /wd/hub/session {"capabilities":{"desiredCapabilities":{"platformVersion":"10.0.1","xcodeOrgId":"Y95G5M3Q84","automationName":"XCUITest","useNewWDA":true,"browserName":"Safari","platformName":"iOS","udid":"599ee8713eddeb9f7f4c9a35ec69dbb8cf53f3c8","deviceName":"iPhone 6 (Jenkins SF)","launchTimeout":500000,"updatedWDABundleId":"com.moovweb.WebDriverAgentRunner","xcodeSigningId":"iPhone Developer","wdaLocalPort":8111},"requiredCapabilities":{}},"desiredCapabilities":{"platformVersion":"10.0.1","xcodeOrgId":"Y95G5M3Q84","automationName":"XCUITest","useNewWDA":true,"browserName":"Safari","platformName":"iOS","udid":"599ee8713eddeb9f7f4c9a35ec69dbb8cf53f3c8","deviceName":"iPhone 6 (Jenkins SF)","launchTimeout":500000,"updatedWDABundleId":"com.moovweb.WebDriverAgentRunner","xcodeSigningId":"iPhone Developer","wdaLocalPort":8111},"requiredCapabilities":{}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformVersion":"10.0.1","xcodeOrgId":"Y95G5M3Q84","automationName":"XCUIT
[HTTP] <-- POST /wd/hub/session/9511b0de-99d6-44b8-b533-e5161f7f9c4f/url 200 1680 ms - 76
[HTTP] --> GET /wd/hub/session/9511b0de-99d6-44b8-b533-e5161f7f9c4f/url {}
[debug] [MJSONWP] Calling AppiumDriver.getUrl() with args: ["9511b0de-99d6-44b8-b533-e5161f7f9c4f"]
[debug] [XCUITest] Executing command 'getUrl'
[debug] [RemoteDebugger] Sending javascript command window.location.href
[debug] [RemoteDebugger] Sending WebKit data: {"method":"Runtime.evaluate...
Page 27754/0 not found
Already sent close_frame
[debug] [RemoteDebugger] WebKit remote debugger socket disconnected
[MJSONWP] Encountered internal error running command: TimeoutError: operation timed out