Swipe to change a XCUIElementTypeStaticText value

Here is a my problem:
I have a control page on the app which control a percentage value (stored in a XCUIElementTypeStaticText on iOS). The user has to swipe on the screen for changing this percentage. I did not find a proper way of automating this workflow except: swiping “randomly” and read the value after. But I want to be able to say: ‘change the percentage to 50%’.
Is that possible to read the value during the swiping gesture? (It means doing 2 actions at the same time …)

Is it possible to post a screenshot of that screen? There are several ways you could do that.

Sorry I can’t post a screenshot but here is a copy of the app source found by Appium on this page:

<XCUIElementTypeApplication name="App">
<XCUIElementTypeWindow>
    <XCUIElementTypeOther>
        <XCUIElementTypeOther>
            <XCUIElementTypeNavigationBar name="Title">
            <XCUIElementTypeOther>
                <XCUIElementTypeOther>
                    <XCUIElementTypeOther>
                        <XCUIElementTypeImage>
                        <XCUIElementTypeOther>
                        <XCUIElementTypeStaticText name="titleLbl">
                        <XCUIElementTypeStaticText name="titleDescriptionLbl">
                        <XCUIElementTypeOther>
                            <XCUIElementTypeOther>
                        <XCUIElementTypeOther>
                        <XCUIElementTypeOther>
<XCUIElementTypeWindow>
<XCUIElementTypeWindow>

The object containing the percentage is titleLbl. Hope this helps

From page source I can not gather enough information to know what kind of gesture you need to make - I mean, on which element you need to press and make a swipe. Is there a slide/progress bar you need to press and swipe or you just need to press on a “titleLbl” and while swiping it will change it’s value?

I was thinking if you have vertical progress bar, then I suppose that the bottom point of it is 0% and the most top point is 100%. By knowing what % you would like to apply, you also can calculate, regarding on elements top and bottom point, how much you need to swipe.

Let me know more and we could figure that out…

Sure I understand. Actually I swipe in the XCUIElementTypeOther (the root page element). No slide/progress bar is present. You just have to swipe on the page and the value contained in titleLbl changed. That’s the point which makes it tricky…
I’m trying to find a swipe rule to control the percent value based on your advice because the value increment also depends on the speed of the swiping gesture.