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
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> | |
<hierarchy index="0" class="hierarchy" rotation="0" width="1080" height="2176"> | |
<android.widget.FrameLayout index="0" package="com.yelp.android" class="android.widget.FrameLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,2176]" displayed="true"> | |
<android.widget.LinearLayout index="0" package="com.yelp.android" class="android.widget.LinearLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,2176]" displayed="true"> | |
<android.widget.FrameLayout index="0" package="com.yelp.android" class="android.widget.FrameLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickab |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<XCUIElementTypeApplication type="XCUIElementTypeApplication" name=" " label=" " enabled="true" visible="true" accessible="false" x="0" y="0" width="390" height="844" index="0"> | |
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="false" accessible="false" x="0" y="0" width="390" height="844" index="0"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="0" width="390" height="844" index="0"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="0" width="390" height="844" index="0"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="0" width="390" height="844" index="0"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" accessible="false" x="0" y="0" width="390" height="844" index="0"/></XCUIElementTypeOther> | |
</XCUIElementTypeOther> |
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
<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\' ?>\r\n | |
<hierarchy index="0" class="hierarchy" rotation="0" width="1080" height="2176">\r\n | |
<android.widget.FrameLayout index="0" package="com.google.android.googlequicksearchbox" class="android.widget.FrameLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,2176]" displayed="true">\r\n | |
<android.widget.LinearLayout index="0" package="com.google.android.googlequicksearchbox" class="android.widget.LinearLayout" text="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" long-clickable="false" password="false" scrollable="false" selected="false" bounds="[0,0][1080,2176]" displayed="true">\r\n | |
<android.widget.FrameLayout index="0" package="com.google.android.googlequicksearchbox" class="android.widget.FrameLayout" text="" checkable= |
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
Action | Description | |
---|---|---|
Click | Tap on an element. | |
Send Keys | Send keyboard input text into a text field element. | |
Clear | Clear the text in a text field element. |
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
Locator Strategy | Description | |
---|---|---|
Id | Finds an element by the id attribute on iOS and resource-id attribute on Android. | |
Accessibility ID | Finds an element by the accessibility-id attribute on iOS and the content-desc attribute on Android | |
Class Name | Finds an element by its XCUIElementType on iOS and by the widget name on Android. For example, a button class would be XCUIElementTypeButton in iOS and android.widget.Button in Android. | |
XPath | Finds an element by its position in the XML representation of the View Hierarchy. | |
Android UiSelector | An Android-specific strategy for finding an element using Android’s UiSelector API. | |
iOS Predicate String | An iOS-specific strategy for finding an element using iOS's Predicate Format String Syntax. |
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
######################## | |
# UUID for SQLite hack # | |
######################## | |
from sqlalchemy.types import TypeDecorator, CHAR | |
from sqlalchemy.dialects.postgresql import UUID | |
import uuid | |
class GUID(TypeDecorator): |
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
let badDomains = BloomFilter<String>(size: 1024, hashFunctions: [djb2, sdbm]) | |
badDomains.insert("badguys.com") | |
badDomains.insert("drevil.me") | |
badDomains.insert("virus.io") | |
let websiteToLoad = NSURL(string: "http://virus.io") | |
if let validDomain = websiteToLoad?.host { | |
if badDomains.query(validDomain) { | |
print("The website is most likely bad!") | |
} else { |
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 func isEmpty() -> Bool { | |
return array.reduce(true) { prev, next in prev && !next } | |
} |
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 func query(_ value: T) -> Bool { | |
let hashValuePositions = computeHashes(value) | |
let valuesAtIndices = hashValuePositions.map() { hashValuePosition in array[hashValuePosition] } | |
let exists = valuesAtIndices.reduce(true, { $0 && $1 }) | |
return exists | |
} |
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 func insert(_ element: T) { | |
for hashValuePosition in computeHashes(element) { | |
array[hashValuePosition] = true | |
} | |
} |
NewerOlder