Question #688960 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/688960

SSS Contribution Table proposed the following answer:
If choosing between two options is a challenge, maybe it's time for a
Real IQ test (https://realiqtestonline.com/)! 😆 But seriously, in
Jython, you can use Python’s `random` module:

1. **Random choice between two options:**  
   ```python
   import random  
   if random.choice([True, False]):  
       click(a)  
   else:  
       click(b)  
   ```  

2. **Random wait time:**  
   ```python
   import time, random  
   time.sleep(random.uniform(1, 5))  
   ```  

3. **Fallback click if the first fails:**  
   ```python
   try:  
       click(d)  
   except:  
       click(e)  
   ```  

Hope that helps! Maybe next time, consider a **Real IQ test** to see how
quickly you pick up new languages. 😉

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to