0
votes

I have prepared web testing script on Mac OSX with watir-webdriver. It was running fine with Firefox. However, then I ran the script on Windows with Firefox and the text entry is slow, like typing each word individually. I have read couple of threads in regards to this problem, but never came to the solution. Maybe someone could shed some light on this.

Please also kindly note that I use browser.element(:xpath).set "text" to locate the elements to set the text.

Thank you very much in advance.

1
Why would you use xpath with watir-webdriver, when one of the main strengths of the watir API is the ability to completely dispense with xpath and its exceeding awfulness? - Abe Heward
Is the problem specific to the page or all text fields? For example, if you create a page with just an input field, does the problem still occur? - Justin Ko
@Abe Heward - There are certain cases, where xpath is very powerful. - Maxo
You give me a situation where xpath is powerful and I bet you I can give you Watir code that is equally powerful, but not as unreadable or difficult to figure out. :-) - Abe Heward

1 Answers

1
votes

The issue has been resolved using Clipboard gem. Instead of using .set or .value methods, I started using Clipboard copy / paste, which worked perfectly. I still do not consider this as best solution, but it can get the job done.