Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to lock the mobile device screen in Appium ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 563
    Comment on it

    The mobile device screen can able to locked programmatically. Appium provides a method through which we can perform the same.

    lockScreen(int seconds)

    The argument should be an integer value ie the number of seconds we want the screen to be in locked state.

    Suppose we want the mobile device to be in locked state for 10 seconds then we can use the above method in the following way:

    //Configure the desired capablilites of the mobile device
    driver.lockScreen(10);
    

    On executing the above code, screen will be locked for 10 secs and we cannot perform any action on the screen for 10 and after 10 seconds the screen will be unlocked.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: