     func existsPhotoSliderScrollView(app: XCUIApplication) {
 
         sleep(1)
-        XCTAssertEqual(app.scrollViews.matchingIdentifier("PhotoSliderScrollView").element.exists, false)
+        XCTAssertEqual(app.scrollViews.matching(identifier: "PhotoSliderScrollView").element.exists, false)
 
     }
     

        let app = XCUIApplication()
        app.otherElements["rootView"].tap()

        let element = app.scrollViews.matchingIdentifier("PhotoSliderScrollView").elementBoundByIndex(0)
        element.swipeLeft()
        element.swipeLeft()

        XCUIDevice.sharedDevice().orientation = .LandscapeRight
        XCUIDevice.sharedDevice().orientation = .PortraitUpsideDown
        XCUIDevice.sharedDevice().orientation = .LandscapeLeft
        XCUIDevice.sharedDevice().orientation = .Portrait
        app.buttons["PhotoSliderClose"].tap()
    }
    
    func testZooming() {
        XCUIDevice.sharedDevice().orientation = .Portrait
        
        let app = XCUIApplication()
        app.otherElements["rootView"].tap()
        
        let element = app.scrollViews.matchingIdentifier("PhotoSliderScrollView").elementBoundByIndex(0)
        element.doubleTap()
        element.swipeUp()
        element.swipeDown()
        element.doubleTap()
        app.buttons["PhotoSliderClose"].tap()
        
        self.existsPhotoSliderScrollView(app)
    }

}

        element.swipeRight()
        app.buttons["PhotoSliderClose"].tap()
        
        self.existsPhotoSliderScrollView(app: app)
    }
    
    func testCloseWithSwipingUpImage() {
        let app = XCUIApplication()
        app.otherElements["rootView"].tap()
        
        let element = app.scrollViews.matching(identifier: "PhotoSliderScrollView").element(boundBy: 0)
        element.swipeUp()
        
        self.existsPhotoSliderScrollView(app: app)
    }
    
    func testCloseWithSwipingDownImage() {
        let app = XCUIApplication()
        app.otherElements["rootView"].tap()
        
        let element = app.scrollViews.matching(identifier: "PhotoSliderScrollView").element(boundBy: 0)
        element.swipeDown()
        
        self.existsPhotoSliderScrollView(app: app)
    }
    
    func testRightRotation() {
