← Back to team overview

sikuli-driver team mailing list archive

[Bug 2129646] Re: cnannot click on a region moved by .below or .right

 

code used'


def processDailyBonus(regDnH):
    dailyBonus     = "1761178373877.png"
    altarIcon      = "1761169548207.png"
    regDailyBonus = Region(420,258,152,144)
    
    bonusChecked   = "1761178438518.png"
    bonusExit      = "1761181856602.png"

    print "Process Daily Bonus"
    for sel in range(30):
        if regDnH.exists(dailyBonus, 0 ):
            print "Process Daily Bonus"
            break
        if regDnH.exists(altarIcon, 0 ):
            return true
        
    regBonusSel = regDailyBonus
    for bonusSel in range(28):
        if bonusSel == 0:
            regBonusSel = regDailyBonus
        elif bonusSel == 7:
            regBonusSel = regDailyBonus.below(regDailyBonus.getH())
        elif bonusSel == 14:
            regBonusSel = regDailyBonus.below(regDailyBonus.getH())
            regBonusSel = regBonusSel.below(regDailyBonus.getH())
        elif bonusSel == 21:
            regBonusSel = regDailyBonus.below(regDailyBonus.getH())
            regBonusSel = regBonusSel.below(regDailyBonus.getH())
            regBonusSel = regBonusSel.below(regDailyBonus.getH())
        regDnH.hover(regBonusSel)
        if not regBonusSel.exists(bonusChecked):
            if test == True:
                print "Daily bonus found: ", bonusSel + 1
                exit(0)
            regBonusSel.click(regBonusSel)
            print "Bonus day '", bonusSel + 1, "' selected"
            if not regDnH.waitVanish(dailyBonus):
                print "Select Daily Bonus '", bonusSel + 1, "' failed"
                return False
            print "Wait for Daily Bonus completion"
            sleep(5)
            return True
        regBonusSel = regBonusSel.right(regBonusSel.getW())
    return True

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to SikuliX.
https://bugs.launchpad.net/bugs/2129646

Title:
  cnannot click on a region moved by .below or .right

Status in SikuliX:
  New

Bug description:
  I have a 6by 4 grid of square cells.

  I move the  the cells until I find a cell tot matching an image.

  I try to click on that cell.

  I get the following error:

     [error] Mouse.move(): Mouse not useable (blocked)

  I count the number of mis-matches and it is correct.

  Why wont it .click on the mismatched cell"\?

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/2129646/+subscriptions



References