diff --git a/features/step_definitions/examples/probleme_steps.rb b/features/step_definitions/examples/probleme_steps.rb index 4557b4be9b..4eb391dee1 100644 --- a/features/step_definitions/examples/probleme_steps.rb +++ b/features/step_definitions/examples/probleme_steps.rb @@ -155,7 +155,7 @@ def open_inspection_for_line(line_id) if @event == "hand_over" @item = @ip.items.broken.first step 'I add an item to the hand over' - @line_id = find(".line [data-assign-item][disabled]", match: :first).find(:xpath, "./../../..")[:"data-id"] + @line_id = find("input[value='#{@item.inventory_code}']").find(:xpath, "ancestor::div[@data-id]")["data-id"].to_i elsif @event == "take_back" @line_id = find(".line[data-line-type='item_line']", match: :first)[:"data-id"] step 'markiere ich den Gegenstand als defekt'