ioskif

How can I change the default timeout using KIF?


I am using KIF for developing tests, but sometimes because I am getting data from a service that takes more than 10 seconds a tests fails, so I would like to know how to change the default timeout.

Is there other solution for this issue I was trying:

[tester waitForAbsenceOfViewWithAccessibilityLabel:@"Configuración"];

However, it seems this function is not working properly so I have decided to increase the timeout.


Solution

  • How about something like:

    [[tester usingTimeout:60]  waitForAbsenceOfViewWithAccessibilityLabel:@"Configuración"];
    

    See also this blog post. On a side note, you might want to look into mock or dummy services to lessen the time taken to test and decrease the load on your services.