java - Wait for two conditions simultaneously Helium -
i'm using these 3 lines:
waituntil(text("wait").exists, 900); switchto("testing"); click(point(995, 440));
i'm waiting text show up, clicks button in different tab, if want have listen "go" simultaneously , have click different button?
waituntil(text("go").exists, 900); switchto("testing"); click(point(1100, 440));
i have no way of knowing show first. i've tried working around if conditions, can't seem work quite how want to. ideas on how make happen?
i ended putting 2 if statements in refresh loop, "works", it's not ideal. it's slow (too slow) , quits. other ideas?
public static void repeatscript() { refresh(); if (text("wait").exists()) wait(); if (text("go").exists()) go(); repeatscript(); }
Comments
Post a Comment