複数の動的行を持つ Web アプリをテストしています。近くをスコープしてつかむものは何もありません。特定のフィールドに移動するには、ID を取得できるものを取得し、操作したいテキスト ボックスまたはセレクターにタブで移動します。
このように見えます...
editor = page.find_by_id('grabbable')
editor.native.send_keys(:tab, :tab, "Hello World")
私がやりたいことは、次のようなものです...
tab_amount = tabs(2)
editor = page.find_by_id('grabbable')
editor.native.send_keys(tab_amount, "Hello World")
...
def tabs(amount)
tab_object = :tab
while amount > 1
tab_object = tab_object + :tab
amount = amount - 1
end
return tab_amount
end
そのような動的タブは可能ですか?