 Welcome everyone to the session, Swiping Your Way Through APM by Wim. We are glad that they could join us today without any further delay over to you, Wim. Yeah, thanks. Thanks. And everybody, welcome to Swiping Your Way Through APM. My name is Wim Sellas. I'm a CTA Solutions Architect at Sauce Labs. And yeah, I'm not going to introduce myself anymore because you're not here for me. I think you're here to see what you could do with APM and what you could do with the swiping. And that's the subject that I wanted to cover, Swiping. I'm like gestures. And yeah, let's start with that. Let's start with gestures because I believe that gestures are played a very, very important role in the apps that are being used. And what I also see is that the gestures are things that are hardly used within app automation. And then I'm not only talking about scrolling because yeah, normally when you do the automation, you also need to scroll. You have an element that's not in the view. You need to create a way to get to that element. So I'm not only talking about scrolling, but I'm talking about the things that you would see here, like tabbing, like dragging, flick, swipe, double tap, pinching. And these are only the names from iOS, from Apple. Google also has some names. For Android, we even have the fling. And I will cover all those gestures today. But what I see and what, if you would think about automating an application, then nine out of 10 times your end user is using his fingers. He's not using a script. So why don't we use that? Why don't we think as a user? Why don't we, for example, test swiping from one screen to the other screen? Why don't we do pinching and zooming? We can already verify a lot of those things. And the reason why I want to dive into the gestures has to do with the fact that I've seen things go to production, where we didn't test proper swiping or proper scrolling or basically the gestures. The automation script was successful, but in the end there was a bug in the application. Let me just show you a simple example of this one. I recorded a video and on the left you would see a simple website. Well, simple. It's the website of WebDriver.io. You can do some scrolling. It's an emulator and with my mouse I can drag and drop it. But when we talk about automation scripts, we're basically injecting a piece of JavaScript to do some scrolling, as you can see here. But what if I would now introduce a bug in the website? I would just basically remove scrolling. I would say you're not allowed to scroll. So now let's try to use this again. Let's try to see what's happening. I'm stuck. I cannot do the swiping. So if I would now do this with my automation, as you can see, I can still do the scrolling. So basically my script will work and the end user cannot use your application. So hopefully today we're going to look into how Appium can help you create those gestures. And if you want to start with that, the first point that I always advise people to look at is the documentation. So let's take a look at the documentation page. If we're talking about gestures, you can go to the Appium.io documentation page. And if you would go to the tab, writing and running test cases, you would see something about gestures. And if you would read the documentation and then you're like, OK, well, how should I use it? Well, there are two ways. We have the easy way and we have the hard way. And today we're not going to start with the easy way. Today we're going to start with the hard way. And even though I cannot see you, I already have the feeling that you're like, why would you do that to me? Why do we start with the hard way? Well, the reason why I want to start with the hard way is that I believe that if we think as a real user how he would use his single or multiple fingers, then it would give us better ideas how to automate something like that. By understanding that hard way, we think better about usability, how the user is using our application. The easy way, it's always nice to start with the easy way, but then we're basically just copy pasting, not thinking about it. At least that's my opinion. You might have a different opinion about it, but let's just dive into the hard way. And the hard way we have two options. If you would dive into the documentation again of Appium, you would see a command which is called touch perform. And you can use the touch perform to interact with the elements based on actions that you're sending. You can basically send, as they call it, multiple touch commands as one command to Appium. Sorry, I'm not saying now click on the screen then swipe on the screen with multiple commands. No, you just send an object of actions to the Appium server and then the Appium server will execute them for that for you. When it's done, you will get a response back, I'm done. And that's it. That's what the touch perform can do. The downside of the touch perform is that it can only work in the native context. And when I'm talking about the native context, I mean native API and native applications, not when we're talking about web applications. And also the touch perform API is not officially W3C compatible. And now that we're thinking about or talking about Actitude. Also based on the presentation from Jonathan Lips this morning. This might not be the best one. So my advice would be don't look into this one. It might even be deprecating not 100% sure what will happen. But let's take a look at a different one. This is a one is this one is also being supported by W3C. Basically all the Selenium drivers that are coming that are supporting W3C will support the actions API. With the actions API, it's basically the same as the touch perform, but it's W3C compatible. As I mentioned, the option that you have is you can use in the native and in the web, slash web view if you have a hybrid application context. It is a little bit more complex. On the other hand, it's a little bit more verbose. So it will basically force you to think about the steps. And in the end, you'd have more options. You can do more with the actions API than you could think of. So if we would now look into this documentation page, and then you would see a lot of code here and if we would scroll a little bit down, you would see all kinds of options. And we miss a little bit of context about those options. But Jonathan already helped us with that this if we just go to this page, then we would see almost all the options you have with the actions API. Let's let's just start with this. Let's just take a look at what we could do. And for details, I'm not going to highlight all the details. I will share the slides afterwards also with the links to all the pages. But let's just dive into a few things that are really important. And yeah, let's let's just do that. So we would look into action, and then we would have code like this where we had a driver and in this case, I'm using JavaScript. So I would say dot perform action. So let's take a look at what we need to put into that action. And what's basically what we could do with it. Well, first of all, what we need to do with an action is that we need to create an event where we provide a type where we provide an ID. We provide some arguments if needed, the parameters and an action. Let's just start with the type. We've got two types of types. We have a pointer. A pointer is basically the same as a mouse or a pen or a touch. And we have a key event and a key event would be that you're able to send keystrokes to your device. So not using send keys, but even in this case with perform action, you can do a key down and a key up. I'm not going to dive into that today. If you would read the documentation and maybe even play with it. You might learn also the advantages of that. The ID is also important because which I will also explain later on, but the ID needs to be unique. In this case, I'm going to call it a finger finger one. This is my first action. Then you also need to provide parameters, especially when we're talking about a pointer, because what I already mentioned a pointer is or your mouse or it is a pen or it is a touch. And in this case, we're going to touch events. We're looking in how our users are going to use their fingers. So I'm going to provide that pointer type is touch. And then I need to provide actions and actions is an array of objects. So let's take a look at the actions. What do I want to do with this specific event? Well, in this case, we need to think as a user. I want to move my finger, for example, I want to move my finger from one position to another position. Then I need to bring it down to the screen. Then I can wait a few milliseconds and the waiting that passes there. If you would think about you as a user, if you would have your mobile phone, you would put your finger on the screen before you swipe or zoom or pinch, you always have a small break. So that's also something that you could put in here. Then we need to move our finger to the position we want to do and then we need to basically get our finger up again from the screen. So that's one of the steps we need to think of when we're automating something for gestures. But that's the basic gesture action. And there are some things that we need to be aware of. By default, the action will be executed on the complete screen, basically your viewport. But if you want to change it, if you want to adjust that action to only an element, you can provide an element. So the provided coordinates will be executed relatively to that provided element. And I will dive into that later on, how that works, how that also works with the coordinates. And now just explaining what the action means. And then last but not least, we also have the option to provide multiple actions. We already saw finger one, which is an object which has actions, which is an error, but we can add another event. And that event will be then executed simultaneously so we could even do something with two fingers. Let's take a look at an example and how we could automate that example and let's start with two examples. What we're going to do today is we're first going to look into the scroll and the scroll is very easy. We've got an application and we just scroll down and we go to scroll to the WebDriver.io logo. The second one is that when we're scrolled to the logo, we're going to zoom. In this case, we're going to use two fingers. So the first one, one finger and the second one, two fingers. But before we go into the coding, I want to get back to what I mentioned that an action is a little bit verbal, that you need to explain all the steps. So what I want to do here is to walk with you through the steps, actually the behavior of your end user. And you basically need to translate those steps into actions, into code. So let's take a look at this. We've got our application and what I already mentioned, the first action we need to do is we need to set the event. And as you can already see the dot there, it represents our finger. So we have the event. We're not doing anything yet. It's not on the screen. It's outside of the screen. That's the finger we have that we're going to use. Then we need to determine where we need to move our finger to. In this case, you already see the finger moving. But this application, it has basically a viewport where the application itself can scroll and it has a tab bar. In our case, we need to think that we need to be aware of the fact that we need to scroll inside of that scroll view. We do not need to scroll on the tab because that will break basically our automation. That's also not how your user would use it. So we need to determine the position of our scrolling area. And there we need to determine the X and the Y coordinates. The X will be the position on the horizontal axis and the Y coordinate will be the position on the vertical axis. So if we have those two points, that's the area where we want to start. Then what we need to do basically get in touch with the screen. So you already saw the dot getting a little bit smaller because it touched the screen. We can wait for a bit. And then we're going to move our finger into a position, meaning an end position. Where do we want our finger to leave the screen again? That's what we do with the scroll. And then we also need to provide a speed. The speed determines how fast that swipe will be. If you do a very slow swipe, then basically the screen will stitch on your finger and you basically put it from one position to the other. If you do it fast, you're basically letting it go like this and then you will go immediately to the bottom. So the speed has an impact on how your scroll will execute. And then last but not least, we need to move our finger up and then basically our finger is gone. So let's dive a little bit more into that area that we have, that scroll area. How can we determine the starting position and the end position? So let's take a look at that. We've got our screen again. We can get the coordinates of this screen. We can get the coordinates, especially of this element. And I already put a link in here, but you can use also an Appian command, which will be get element rectangles. We provide the ID of the element. In this case, this was a scroll view. And that scroll view will return data. Basically this command will return data about that scroll view. The data that you will get back is the height of that element, the width of that element, and you will get back the X position, meaning where does the element start. On the left basically on the horizontal axis. And where does the element start on the vertical axis? Just a few minutes to the corner. Sorry. Just ahead of five minutes. Sorry, I have 45 minutes. Okay, sure. Yeah. Let's get back. Yeah, we have the coordinates. We have to hide the width, the X and the Y position. Reason for doing this is that we need to have something which is also cross-platform that because that's something what you could do with the Actions API. But we also want to make sure that the command that we're going to create, the gesture that we're going to create, will be, can be used on different screens. Because you can already see Android gives a different output in comparison to iOS, but these are for two specific devices. It was a pixel device and an iPhone 11. But what if you have smaller screens? Well, this will return the right data. So if we have this data, we now need to determine the starting position and the end position. If we look into determining the start position, then I would like to advise you to think about a few steps. First of all, what we need to do, this is a scroll gesture. So we're only moving on the vertical axis. We're not moving from the left to the right. So the X coordinate will always stay the same. I also need to think about where do I want to start? My advice would always be start at the center of an element. So in this case, I need to have the width of that element divided by two. But as you can see here already in the command, I'm also adding the X position. Even though the X position, the starting point of the element was zero. If you think about this and you have an element that's not starting at the left of your screen, but basically 40, 50, 60 or 70 pixels from the left, you would now have the proper center of that element. And that's also something that we're going to see in the next example about the pinch and zoom. But for now it's just a null, but now you would have the center. Now we need to think about where do we want to start our, basically our Y position. So not on the horizontal, but on the vertical axis. Where do we want to have our finger? We want to start by looking at the height of the element. We already got that one back. If you would now say, okay, the height of the element is correct. And I would use that. Now my advice would be to think about what if the height of that element is at the same point where your tab bar might start. Then if you would put your finger down and would do something, are you then sure that you're using your swipe area, your scroll area, or are you clicking on the tab? So maybe in this case, I used 90%. So I'm using the height times 90%. So my finger will be a little bit higher than the bottom of that element. And again, I'm using the Y coordinate also because it starts at 66 pixels on iOS as you saw. So this will give me the exact point and I can have my finger there as you can see. Then we need to think about the end position and the end position can basically be the beginning of the Y coordinate, basically the top of the screen. So for this case, I'm only doing horizontal, the X axis will stay the same. I only need to change the Y coordinate. This means that I have two points here. Now that I have this information, I can construct that action. If we look at the action here, then again, we would have the pointer, we have the finger and the touch, which is basically the event. And then the actions, we have the center X start Y, we have the center X for the movement and also the end Y. But now we also need to make it a little bit more useful because this is only doing one swipe. But what if we cannot find the element? What if the element is not displayed? We could think about all kinds of ways where we need to scroll multiple times. So my advice would be maybe you can create a for loop or whatever you want to use in your coding examples. In this case, I'm saying, okay, within five scrolls, I need to see my element. If I see it sooner, then stop it, then break it. So I do the scroll, I wait for the element to check if the element is displayed. If it is displayed, I'm going to break my for loop and I will go to the next action or to the next thing that I want to do with my script. If it is not displayed, I'm going back to my for loop, going to swipe again, check if it's displayed. Well, this is basically the way how you could implement a swipe or a scroll depending on how you want to call it from the bottom to the top. So you would see what's beneath your tempor. So now that we've seen this, let's take a look also at that pinch and zoom. What do we need to do to zoom into our image? Well, first of all, we need to set the event. And again, on the right now, you would see two dots. Those are the two fingers that we want to use for scrolling. Normally, I would use my thumb and my finger, my pointer finger to do this. So those are the two fingers. Then I need to move my finger into the position. But to be able to do that, I need to be aware of the fact that the WebDriver.io bot is not on the left of the screen. So that makes me need, I now need to think about where should I do that? Then we need to basically put our fingers in contact with the WebDriver.io bot, wait for a bit, then move it into the position where we want to have it when we're zooming. Again, determine the X and the Y position, but now for both fingers, also determine the speed. The faster you do it, the sooner it will zoom. And in the end, it will also, you need to lift it from the screen again. So these are the steps. This is how I would normally do zoom if I need to zoom on my physical mobile device. So let's take a look at determining the position. If you would be able to retrieve that element, then you would see here that you have a different X position than we would have with the other one with the scroll view itself. It's in the center of the screen. So if we now need to translate this, we need to think about where is that center of that element. On the other hand, we also need to think about that we need to create two starting positions. I call it finger one and finger two. So let's take a look at that code. First of all, we need to determine the center of the elements. And we can do that by using X starting position of that element and calculate the width divided by two. And then we have the center of the elements. We need to do the same for the Y position. Take the starting Y position of that element on your screen, then divide the height between the divided by two. And then you would have the center Y. In this touch action, in this gesture that I'm going to do, I'm not going to move on the vertical axis. So the only thing I need to change is what's happening on the horizontal axis. Also, if you think about this, you will never put both fingers at the center of that element. That's why I put a movement there, an X movement. So the starting position of finger one will be the center minus 100 pixels. And the starting position of finger two will be the center of the element plus 100 pixels. So I would have that difference from center. So I have my fingers basically a little bit open like this. Then we need to think about where do we want our fingers to go on the horizontal axis. So we need to change the X position for finger one and finger two. And we could basically use the extra 100 pixels again. And in this case, we would say, okay, let's just use the center element again and now minus two movements and or do it plus two movements. And if you would then do that, you would have that physical or basically that touch action almost done. The only thing we now need to do is we need to create that action where we have two actions in the perform actions array. I already commented it out here, we have a first finger that one needs to have a unique ID. So I call it finger one. The second one has an ID and that's basically for our second finger. So I call it finger two. So now both actions will be executed at the same time. One goes to the left, one goes to the right. This will mimic how a user would do a zoom. If we would turn certain values around, for example, finger one star and finger one and if we would turn it around, then you would basically have a pinch. Now that we've seen how we can create it, let's take a look at a small demo. In this demo, you would have, you will see to an emulator in the simulator. The left iOS on the right, you would see Android and we're now going to look into the code. I will share this code afterwards. So you would have also the links to a repository with all the code examples. So you would be able to also create this or run this on your local emulator or local simulator. The apps are also there. As you can see here, I've commented everything basically with some steps. So hopefully that would help you to run this or maybe translate this to your own code if you're using Java. So let's start running our test case and hopefully that will be done now. In this case, I'm going to run two test cases, the scroll and also the zoom on both devices. So they are now starting to run on iOS. In this case, iOS is faster than Android. Don't ask me why. And we're going to do our swipe on the left on iOS. It's done. What I normally always do between my test cases, I close my app and I start my app again. So that's also what's happening here because I want to have a clear state or clean state between two test cases. Now on the left, iOS is already busy with the zooming. And as you can see, it now already zoomed into the logo and Android is almost done. It started the first test case is now going to start the second test case. And in a few seconds, we will see it starting to zoom. So now we created one script with the perform action and that could be used on both devices. By thinking about how our user would use it and also thinking about collecting data from the elements that we want to use for the scrolling, we created something which is cross platform. So basically write it once, run it on multiple platforms, but also cross device, which is pretty useful. If you want to play with this, then I have, I think, a nice challenge for you in the demo repository. You will also find a way to use drag and drop. I created a small puzzle for you so you can test this by using the touch action API and by solving this puzzle. And then the assignment would be for you to create a test case where in the end you would get the convening because you solve the puzzle. I will share that link also afterwards. You would see some remarks in the documentation and the code on how to do this. And please let me know also on Twitter, you can find my handle on the right, if you were, if you managed to solve this. So now let's take a look at the easy way because yeah, we're not only here for the hardware, we're also here for the easy way. If we would look for example at the easy way then there's an advantage that the drivers provide. They have specific gestures, basically shortcuts to do pinching and zooming. It has a pro and it has a con. The pro is it's pretty easy to use. The con is that they're not cross-platform. They have different commands for the drivers. You've got the XY test driver, which you will use for automating iOS and you have the UI automated to driver, which you will use for Android. And to be able to use it for Android, you need to be on at least Appium 1.19 because that's the version where also the shortcuts were added for Android. But that's basically what you could do. The advantage is they're quick, like I already mentioned. And in the end, if you read the documentation, very, very easy to use. You can even write it as a one-liner. And yeah, if you want to make it a little bit more cross-platform, then you need to have at least five lines of code depending on which language you use. But yeah, let's just take a look at it. If you would go back into the documentation of Appium and would go to Riding and Running, then go to iOS and then go to Mobile Gestures, you would have a page like this where you would see multiple commands. You have the same also for Android. For Android, you also have multiple gestures that you can use to basically interact with the elements. But before we dive into how to use them, I first want to take a look at the differences between them. First of all, if you want to use a command, basically a driver-specific command, you need to use the execute or the execute script depending on the bindings that you're using or the language that you're using. You need to use the execute or execute script command. There you provide a string and an object of options. As you can already see, we have swipe gesture for Android and we have the mobile swipe for iOS. There's only a difference in name. There are also some differences in options, so you need to look into the documentation to find those options. Also for the scroll, you also have a scroll gesture and you might think now what's the difference between a scroll and between the swipe? Documentation can help you, but it's basically a naming convention and it even differs between Apple and Android or Apple and Google. We will take a look at it later on. We also have a fling gesture. That's something from Android and you do not have that on iOS. And what's the difference then with a fling gesture? Well, basically, a fling gesture is a swipe. Officially, a swipe is seen as something that you do. For example, if you use WhatsApp or whatever tool you would have a row and you could basically remove something from that row. And if you swipe it to the left, you would see, for example, the bin that you could remove that chat. That's what you do with a swipe. A fling gesture is something and that's also with a scroll that will be faster over the screen. So swipe is slower, fling or scroll is faster. Then we also have the pinch and iOS has a specific one. Sorry, Android has a specific one. You can only pinch basically with a closed gesture. iOS has it for both. Just provide a scale. Android also has the pinch open gesture. Then we also have a double click. That's also in the iOS. Then we also have a long click. Awesome. Also for iOS. So if we just look into the documentation, we would have commands that are supported or not supported by both drivers. So what we need to think now is that if we need to create something which would be cross-platform, then you should wonder, should I use the driver specific ones or should I use the touch actions? Basically the actions API. Then I can make it to whatever thing I want to create with that action. But let's take a look at what we need to do if we want to go back to the scroll that we had. If we look into the code and want to create the scroll in the same way with iOS and with Android as we did with the actions API, then you will get a code like this where you would say, okay, let's just think about my Android. Then I need to do something with the scroll gesture. I need to provide the elements. I can provide the direction. Don't even need to do any calculation. It could be down. It could be top. It could be up. It could be left. It could be right. And that's almost the same also for iOS. That's why we have the else situation. In this case, we need to provide the scroll commands. The element for iOS is optional. If you don't provide it, it will just scroll on the complete screen. And also a direction here. And you can also say speed or basically the duration. So this is how we can create this for the driver specific commands. Now let's take a look at the pinch and zoom. How should we create at least the zooming on that WebDriver.io logo if we would look into the specific driver specific commands. And again, it's not a lot of code what we have here. Like I mentioned, this could all even be a five lines of code where we have the if, if we have the await, the else, the await, and then basically stopping the if and else condition. And here we would see that we have the pinch open gesture. We need to provide the element and the percentage that we want to use. And for iOS, we would have the elements. We need to have the scale. Do you want to make it bigger? Everything above one is zooming out every everything below one is pinching making it smaller and also the velocity. How fast do you want it to happen? So these are the things that you need to use if you want to use the driver specific gestures. If you would now do this in code and run this, then you would have something like this on the left again iOS on the right, you would have Android and now we're going to look into the code. I've also added a scroll for loop here. Basically the code that I've also shown you for the scroll event. And if we scroll a little bit down in our screen, then a little bit down. Then we would also get back to the action or basically where we need to do the zooming with this driver specific one. So I'm going to go to execute it on both devices at the same time. And again, iOS is faster in comparison to Android. Don't know why it's called and it's there. Same for Android. It's going to execute it go to the swipe screen. It will scroll. Did it find it? No, did it find it? Yes, it will stop scrolling. It will now execute the zoom event. So let's scroll again to the bottom. Is it there? Yes, it is. Let's start the zoom with iOS and we started it here. This might now be a little bit slow, but for demo purposes, as you can already see in the code here. For demo purposes, I added extra weights of five seconds. So normally this would be even faster to execute, but due to the pauses that I added for the demo, it is a little bit slower. So now we created this same gesture for scrolling and for zooming with the driver specific ones. So what are the challenges that you could face? Well, it could be that you created an event. Touch with the actions API or with the driver specific ones and you're not seeing anything happening on your screen. Well, then you have an option with Android. There's a tip that I want to share with you that you could see what will happen when we're going to execute a gesture on an Android screen. That's basically using your emulator or your physical device. Go to the system settings and then make sure that you're a developer and you can just need to do some extra steps for that. But go to the system settings, then go to the developer options. When you go to the developer options, you need to search for the thing that you want to use. We're going to use tabs with a P. Just go a little bit up, enable show tabs and enable pointer location. And if you enable those, then you would see a blue line on your screen, a thin line of one pixel by one pixel. As you can see here, and that one, if you even do the automation will tell you if your gesture was executed, at least if your code was executed. And then you might see, for example, that it's not using the right element to do this calling. So this is a way for you to see with your code and with your emulator or your real device from Android to see if the gesture really happens, the code gesture really happens. So now that we know this, kind of like the challenge that we had, what would be your advice? At least what would be my advice for you? So let's take a look at the advice. Should I use the actions or should I use the mobile gesture? Basically the specific gestures, the driver gestures. And like you can already see, you can create complex gestures with the actions API. It's really nice. I like to use this a lot. It's really nice to play with. You can really do awesome stuff. Think about a situation that your app responds on three fingers. Well, try to make that work with the driver specific ones, then you definitely need to use the actions API or do some rotation that was available for iOS in the driver specific ones, but not for Android. So then you still need to make it. It can even be used with key events like I started mentioned in the beginning and see it then as when you have a focused input field, you could use send keys to send keys to that input field. But you can also create an action with key down and key up to send data to it. So there's an extra option for you to basically send data to that input field. And in my opinion, I really like something which is cross-platform so I don't need to look into driver specific things, driver specific options. But on the other hand, if you only need to do iOS or Android, why bother using actions, just use the mobile specific ones. And as you can already see with the code, it's easier to use. So what would be my advice? Well, my advice would be play with it. Use it and basically start getting familiar with it and then choose your own favorite one. There's there's no silver bullet in which action or which mobile gesture, which of the one I would advise it's play with it, use it and see if you can make it work when you're doing your automation. Again, it doesn't matter which one you use. I think the most important part here is that you're able to automate the gestures that your users, the end users of the application that you need to test will still work if you're not going to production with a bug. So if you want to know more about this and even this is the link again, I will share the slides afterwards. This is the link to the repository, you will find the apps, you will find the examples that I have used and you will also find the puzzle assignment. If you like to do it, please let me know if you finished it. And yes, I already provided the answer in it. Some people learn from looking at the answers. If that's the way that you want to do it, be my guest. So are the links that could help you create your own gestures or use the driver specific ones. So I think I have a few minutes left, and we've got some time left for Q&A. Yeah, I'll read out the questions. Can you please talk about the difference between swipe and fling? How do we perform fling action? Yeah, good question. I briefly covered it in the presentation, but basically a swipe. Yeah, use WhatsApp where you would have your chat history. If you would move it from the left to the right, let's go back here to this one. And this is the swipe. Hopefully everybody can see this one. This is the swipe where you basically just move it to the left. In this case for iOS, you can move it completely to the left. And in some cases you would have the bin. And then you need to press the bin. That is a swipe. If we would have a fling or if we would have a flick, that's basically this one here at the corner, right corner. That's basically going over your photos, doing it from left to right very fast. So that's the difference between a swipe, a fling slash flick. Hopefully that answers the question. The next question is, if there's a button in the starting position X, will it click on that button when I swipe? Yeah, basically what will happen when you create your action is that it will press on the screen at a certain point that you give it. So let me go back to, for example, let me just pull up this one. And for example, if this would be a button, if I would click on this one, and that normally opens a page, for example, then we need to be sure that we're not clicking on this point. And then need to be above or below. But by putting your finger on the screen on this position does not trigger the button click itself. It only tells the action to start at that point, keep your finger on that point, and then the move. In the end, if you with the calculation of your action to do, for example, that scroll, if your finger would touch the button, then the button would still not be activated as long as you move it to the top or to the bottom. You can basically see that if you would use your own application, even with a mouse on a web browser, if you keep the mouse pressed on the button, it will not be executed. If you do it like a fast click, then it will be executed. Hopefully that also answers the question. The next question is how can we perform long press hold actions on iOS? Yeah, there are two ways. You can do that by constructing your aim and your own action. And then there's a pause. And let me go to that specific one. It was here. Basically in your finger, the duration, this part, this is the time that you take to press on that button. If you only want to create that long press, then you don't have an extra move to so you can remove those two lines. Just add a duration to it, or you could use the specific methods from iOS. And those specific methods are here. There is a touch and hold command where you have a longer tap on that specific element. Hopefully that also answers the question. Yeah. Do we do we order something like a volume slider? How do we order something like a volume slider? How do you automate that? How do we order something like a volume? Yeah, okay. It's basically the same. The only thing that we need to know if you have that volume slider, where is the touch point where the volume starts. You need to calculate that and drag it to the left. Basically what I gave you as an assignment in the puzzle here. It's this one. It's basically the same dragging and dropping. This can be seen even as a specific as a school or a swipe event. You have a starting position and you have an end position. Hopefully you'll be able to do that when you solve this puzzle and use that in your own script. One last question. The rest of the questions can be taken in the handout session. Can you tell us the best way to scroll to the bottom of a screen that doesn't have a static height? Good question. I think what you could do in that case is at the bottom of a screen you would always have an element. And let me just get that code. I think I had it here somewhere. I need to present it. I think it's the next screen. Basically where you would have a for loop and depending on which language you're using within that for loop, you would say scroll. When the scroll is done, then verify if the element that you're looking for needs to be at the bottom of the screen. If it is visible, if it is visible, click or basically break the for loop so you can do something at the bottom of your screen with other action with other app commands. And if it's not visible, then you need to scroll again so it will go to the second for in your for loop. Scroll and then verify is the element there. That's basically the loop that you need to create with Appium and your code to make this work. Thank you so much. This is this is any session. Thanks everybody. Enjoy the conference. Definitely. The comments are filled with how great the session was. Thanks.