Latest 0.0.1
Homepage https://github.com/albinekcom/XCUIElement-Visible
License MIT
Platforms ios 9.0, osx 10.11
Frameworks XCTest
Authors

This extension adds computed property visible to XCUIElement. It is useful in UI Testing for checking if an element is visible on the screen.

Installation

CocoaPods

Add the following line to the target UITests in your Podfile:

pod 'XCUIElement+Visible'

Swift Package Manager

Add the following line to dependencies in your Package.swift file:

.Package(url: "https://github.com/albinekcom/XCUIElement-Visible.git", majorVersion: 0)

Manually

Add XCUIElement+Visible.swift file from Sources directory into your project.

Usage

  1. Add import statement in your class which inherits from XCTestCase:

    import XCUIElement_Visible
  2. Receive desired XCUIElement in your test method and use its visible property:

    func testExample() {
      let element = // (...)
    
      XCTAssertTrue(element.visible)
    }

Minimum requirements

  • Swift 2
  • iOS 9.0 / OS X 10.11 (where UI Testing is available)

Latest podspec

{
    "name": "XCUIElement+Visible",
    "version": "0.0.1",
    "summary": "It adds visible property to XCUIElement",
    "description": "This extension adds computed property visible to XCUIElement. It is useful in UI Testing for checking if an element is visible on the screen.",
    "homepage": "https://github.com/albinekcom/XCUIElement-Visible",
    "license": "MIT",
    "authors": {
        "Albin 'albinek' Sadowski": "[email protected]"
    },
    "social_media_url": "http://twitter.com/albinekcom",
    "platforms": {
        "ios": "9.0",
        "osx": "10.11"
    },
    "source": {
        "git": "https://github.com/albinekcom/XCUIElement-Visible.git",
        "tag": "0.0.1"
    },
    "source_files": "Sources",
    "frameworks": "XCTest"
}

Pin It on Pinterest

Share This