press(forDuration:) while also checking if element exists

I have a slider that I would like to verify certain elements exist while a press is occuring. Is this something that is possible?


// Press down the slider

let app = XCUIApplication()

app.sliders["Progress Slider"].press(forDuration: 10)


// While the slider press is occuring, verify that certain elements exist on screen

app.staticTexts["Time Stamp Label"].exists


Thanks.