Re: [wtr-general] Re: how can I click an

2018-06-25 Thread Titus Fortner
The error you show here is related to a text field, with a very ugly xpath locator, it is not the error you would get for it not finding @browser.a(id: "Employee_ID") regardless of whether you are using `#click` or `#click!`. You should never have to use XPath with Watir. On Monday, June 25,

Re: [wtr-general] Re: how can I click an

2018-06-25 Thread rajagopalan madasami
Justin, I think this is clearly giving me the clue that WebDriver is also using javascript inside, eh? because they are performing all the mouse move, triggering onclick and all the rest of the step, so they are backing up Javascript comment and creating the exe file. It seems to be that's the cas

Re: [wtr-general] Re: how can I click an

2018-06-25 Thread rajagopalanmadasami
click performs selenium click but click! performs javascript click I suspect the element you want click is not a click, that's what @browser.a(id: "Employee_ID").click! is not working but @browser.link(:xpath, '//*[@id="Employee_ID"]').click! working. when you write xpath, you don't nee

Re: [wtr-general] Re: how can I click an

2018-06-25 Thread c w
Happy week all! Thank you! 1. If I use: is not working @browser.a(id: "Employee_ID").click! timed out after 30 seconds, waiting for true condition on #"//*[@id=\"infotab_11\"]/table/tbody/tr[3]/td[2]/span/div/form/div/div[1]/div[1]/input", :tag_name=>"input"}> (Watir::Wait::TimeoutError)

Re: [wtr-general] Re: how can I click an

2018-06-22 Thread Justin Ko
@rajagopalan, I don't know enough about the internal workings of JavaScript or Webdriver to be sure. But my guess would be: - Browsers do not fully support click events for elements - eg https://stackoverflow.com/q/3487263/1200545 - As a result WebDriver has defined special logic simul

Re: [wtr-general] Re: how can I click an

2018-06-22 Thread rajagopalan madasami
Hi Justin, have you ever try to click option using JavaScript click, it is not choosing as selenium click towards the option would choose the option . But button click remain the same for both, do know why it is ? On 23-Jun-2018 1:06 AM, "Justin Ko" wrote: Do you try using the :id locator? It lo

[wtr-general] Re: how can I click an

2018-06-22 Thread Justin Ko
Do you try using the :id locator? It looks like you might have crossed your attributes/values - ie the attempts are checking the "fielddisplayname" attribute, but looking for the id value. Try: @browser.a(id: "Employee_ID").click If #click isn't working, you could also try #click! @browser.a(