Created
May 12, 2016 02:48
-
-
Save YashdalfTheGray/b50dbde16b7a0e72b0cec1d06668df02 to your computer and use it in GitHub Desktop.
not that this matters >:(
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 * as locators from "./locator"; | |
export function isClassNameLocator(object: any): object is locators.IClassNameLocator { | |
return 'className' in object; | |
} | |
export function isCssLocator(object: any): object is locators.ICssLocator { | |
return 'css' in object; | |
} | |
export function isIdLocator(object: any): object is locators.IIdLocator { | |
return 'id' in object; | |
} | |
export function isJsLocator(object: any): object is locators.IJsLocator { | |
return 'js' in object; | |
} | |
export function isLinkTextLocator(object: any): object is locators.ILinkTextLocator { | |
return 'linkText' in object; | |
} | |
export function isNameLocator(object: any): object is locators.INameLocator { | |
return 'name' in object; | |
} | |
export function isPartialLinkTextLocator(object: any): object is locators.IPartialLinkTextLocator { | |
return 'partialLinkText' in object; | |
} | |
export function isTagNameLocator(object: any): object is locators.ITagNameLocator { | |
return 'tagName' in object; | |
} | |
export function isXpathLocator(object: any): object is locators.IXpathLocator { | |
return 'xpath' in object; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment