recently i'm using watir/ruby publish on facebook automatically. in simple words managed write sentence in text field, can't click on button "publish". tried in different ways:
- browser.link(:value => '1').click
- browser.button(:value => "publish").click
- browser.li(:xpath, '//input[@type="submit"]').click
- browser.link(:href =>'javascript:dosubmit()').click
- browser.a(:text =>"publish").click
but error messages: unable locate element, or element not visible.
i tried write:
- browser.button(:value => '1').exists?
but got answer "false". can me?
thank much
the problem tons of javascript on page. should wait until element appears.
use corresponding functions here
example:
browser.button(:value => "publish").wait_until_present.click