Skip to content

Instantly share code, notes, and snippets.

View vikramvi's full-sized avatar
🚀
React.js, React Native Developer + 4 startup experiences

Vikram Ingleshwar vikramvi

🚀
React.js, React Native Developer + 4 startup experiences
View GitHub Profile
@vikramvi
vikramvi / gist:e3b57e3b70c9fa274441983676054c53
Created January 19, 2018 09:41
chrome_perf_geldHomePage.py
import os
import platform
from selenium import webdriver
from timingsclient import Perf
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver import ChromeOptions
#Jenkins Chrome Browser Fix
@vikramvi
vikramvi / gist:fe020b1ef0f6b36ab4afe08dfcd965e3
Created January 19, 2018 09:40
config_geldHomePage.yaml
PERF_API_URL: "http://localhost/v2/api/cicd/"
api_params:
sla:
visualCompleteTime: 2000
baseline:
days: 7
perc: 75
padding: 1.2
flags:
assertBaseline: true
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.smava</groupId>
<artifactId>WebAnalytics_Automation_RegressionTesting</artifactId>
<version>1.0-SNAPSHOT</version>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.smava</groupId>
<artifactId>WebAnalytics_Automation_RegressionTesting</artifactId>
<version>1.0-SNAPSHOT</version>
import os
import platform
from selenium import webdriver
from timingsclient import Perf
from selenium.webdriver.remote.webdriver import WebDriver as RemoteWebDriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver import ChromeOptions
#Jenkins Chrome Browser Fix
PERF_API_URL: "http://localhost/v2/api/cicd/"
api_params:
sla:
pageLoadTime: 2000
baseline:
days: 7
perc: 75
padding: 1.2
flags:
assertBaseline: true
<?xml version="1.0" encoding="UTF-8"?><AppiumAUT><XCUIElementTypeApplication type="XCUIElementTypeApplication" name="TWM Dev" label="TWM Dev" enabled="true" visible="true" x="0" y="0" width="320" height="568">
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="true" x="0" y="0" width="320" height="568">
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" x="0" y="0" width="320" height="568">
<XCUIElementTypeOther type="XCUIElementTypeOther" name="Experience Total Wine
like never before! Shop for your favorite Wine, Beer, Spirits, and more. Let the experts find what's right for you. LET'S BEGIN" label="Experience Total Wine
like never before! Shop for your favorite Wine, Beer, Spirits, and more. Let the experts find what's right for you. LET'S BEGIN" enabled="true" visible="true" x="0" y="0" width="320" height="568">
<XCUIElementTypeOther type="XCUIElementTypeOther" name="Experience Total Wine
like never before! Shop for your favorite
@vikramvi
vikramvi / gist:53556a6fe2cef7e5363c8b75a50d5f8e
Created December 12, 2017 08:11
- native content: "By.id: LetsBeginButton" - html content: "by id or name "LetsBeginButton""
[debug] [XCUITest] Executing command 'getCurrentContext'
[debug] [MJSONWP] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/8102b21e-d43f-43ed-b820-494851fedbfd/context 200 5 ms - 84
[HTTP] --> POST /wd/hub/session/8102b21e-d43f-43ed-b820-494851fedbfd/element {"using":"id","value":"LetsBeginButton"}
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: ["id","LetsBeginButton","8102b21e-d43f-43ed-b820-494851fedbfd"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 18000 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/897EA12F-CA1B-4630-BE0C-D3685C3A94B7/element] with body: {"using":"id","value":"LetsBeginButton"}
[debug] [JSONWP Proxy] Got response with status 200: {"value":{"using":"id","value":"LetsBegi
('TIMING ----- ', {u'timing': {u'unloadEventStart': 0, u'domLoading': 1510674356806, u'fetchStart': 1510674356333, u'responseStart': 1510674356803, u'loadEventEnd': 1510674360333, u'connectStart': 1510674356374, u'domainLookupStart': 1510674356334, u'redirectStart': 0, u'domContentLoadedEventEnd': 1510674358377, u'requestStart': 1510674356654, u'secureConnectionStart': 1510674356400, u'connectEnd': 1510674356651, u'navigationStart': 1510674356316, u'loadEventStart': 1510674360329, u'domInteractive': 1510674358313, u'domContentLoadedEventStart': 1510674358374, u'redirectEnd': 0, u'domainLookupEnd': 1510674356374, u'unloadEventEnd': 0, u'responseEnd': 1510674356805, u'domComplete': 1510674360329, u'toJSON': {}}, u'url': u'https://suchen.mobile.de/fahrzeuge/financingLandingpage.html?id=248239597&ab.smava=test&damageUnrepaired=NO_DAMAGE_UNREPAIRED&isSearchRequest=true&pageNumber=1&scopeId=C&action=topOfPage&top=1:3&entrypoint=vip_left_column_TestNeu&dartPrice=8980&dartDuration=84', u'visualCompleteTime': 0, u'res
@vikramvi
vikramvi / gist:8fb60a03ecc549d7b3b5329105b458bd
Created November 13, 2017 17:03
chrome_2_perf_check24.py
"""
Selenium Grid with Hub and Node test
"""
import os
import platform
from selenium import webdriver
from timingsclient import Perf
BROWSER = webdriver.Chrome(
'/usr/local/bin/chromedriver')