Reply To: .wait() on getDropDown issue

PennController for IBEX Forums Support .wait() on getDropDown issue Reply To: .wait() on getDropDown issue

#6461
Jeremy
Keymaster

Hi Cory,

There seems to be a bug where re-printing the DropDown element causes the script to ignore selections. In your case, the DropDown element gets re-printed in the before command on your BLand.Text.2 Text element. Barely one day after releasing PennController 1.9, we find a bug to fix for the next release 🙂

Meanwhile, the workaround I recommend consists in not re-printing the DropDown element, and printing your Text elements around it instead:

newTrial(
    defaultText.css("white-space", "nowrap") // prevent linebreaks
    ,
    newDropDown("BLand.Select", "Bitte wählen Sie")
        .add("Baden-Württenmberg", "Bayern", "Berlin", "Brandenburg", "Bremen", "Hamburg", "Hessen", "Niedersachsen", "Mecklenburg-Vorpommern", "Nordrhein-Westfalen", "Rheinland-Pfalz", "Saarland", "Sachsen", "Sachsen-Anhalt", "Schleswig-Holstein", "Thüringen")
        .before(newText("BLand.Text.1","4. Sie haben den Großteil Ihrer ersten 10 Lebensjahre in"))
        .after(newText("BLand.Text.2","gelebt"))
        .css("margin", "0px 25px")
        .print()
        .wait()
    ,
    newButton("Weitermachen")
        .settings.css("margin", "25px auto")
        .print()
        .wait()   
)

Let me know if you have questions

Jeremy