Skip to content

Instantly share code, notes, and snippets.

@jineshqa
jineshqa / test.log
Created March 3, 2020 23:56
appium error
2020-03-03 15:49:44.579009-0800 WebDriverAgentRunner-Runner[13001:2373474] The following attributes were requested to be included into the XML: {(
FBEnabledAttribute,
FBVisibleAttribute,
FBXAttribute,
FBYAttribute,
FBWidthAttribute,
FBHeightAttribute,
FBTypeAttribute,
FBValueAttribute,
FBNameAttribute,
# Redirect console output to a file and display on console at the same time.
bundle exec fastlane <your_lane_here> --verbose 2>&1 | tee /path/to/logfile.txt
@jineshqa
jineshqa / reset_simulators.sh
Created October 22, 2019 17:35
No simulators visible in Xcode
# Install snapshot gem
gem install snapshot
# Reset all the simulators
fastlane snapshot reset_simulators
@jineshqa
jineshqa / screen_commands.sh
Created March 5, 2019 00:39
Screen command usages
# to list the sessions and their status
screen -ls
# to start a session with a given name. The name should be unique
screen -S session_name
# to start a session without going into it
screen -dmS session_name /path/to/script/file.sh
@jineshqa
jineshqa / Makefile
Created January 11, 2019 18:21 — forked from pietbrauer/Makefile
Shutdown and reset all iOS Simulators
erase_sim:
./reset_sim.sh 2>/dev/null; true
@jineshqa
jineshqa / scroll.swift
Last active April 6, 2019 22:40
code to scroll to an element
// Copied from https://stackoverflow.com/a/49944637
import XCTest
enum TestSwipeDirections {
case up
case down
case left
case right
}
@jineshqa
jineshqa / XCUIApplication+Scrolling.swift
Created November 14, 2018 19:33 — forked from ryanmeisters/XCUIApplication+Scrolling.swift
Scrolling helpers automated ui tests using XCUIApplication
extension XCUIApplication {
private struct Constants {
// Half way accross the screen and 10% from top
static let topOffset = CGVector(dx: 0.5, dy: 0.1)
// Half way accross the screen and 90% from top
static let bottomOffset = CGVector(dx: 0.5, dy: 0.9)
}
var screenTopCoordinate: XCUICoordinate {
@jineshqa
jineshqa / udid.md
Last active March 7, 2019 01:59
How to get udid for a particular device from shell using jq

With JQ installed - output of this command is string with quotes

xcrun simctl list --json | jq '.devices["iOS 12.0"] [] | select(.name=="iPhone X") | .udid'

With JQ if you don't want quotes

@jineshqa
jineshqa / grep.md
Last active November 17, 2017 23:53
grep command
$ cat a.txt

hello

This line starts with T and finishes with e

foo

@jineshqa
jineshqa / ubuntu package hold.md
Last active November 14, 2017 05:36
Put a package on hold in ubuntu

dpkg

Put a package on hold:

echo "<package-name> hold" | sudo dpkg --set-selections

Remove the hold:

echo "<package-name> install" | sudo dpkg --set-selections