jkotests / watir-nokogiri

MIT License
10 stars 1 forks source link

Full WatirWebdriver support #6

Open AlexisKAndersen opened 9 years ago

AlexisKAndersen commented 9 years ago

Since this gem can't act as a full replacement to WatirWebdriver, it can't be dropped into code bases as a full replacement. It might be worthwhile to set up both together so that it chooses the better approach for the task (e.g. WatirWebdriver for clicking, WatirNokogiri for reading text) Would this gem be a good place for that kind of integration, or is that outside the scope of what it is trying to provide?

jkotests commented 9 years ago

The goal of this gem was to be a replacement to using Nokogiri rather than Watir-Webdriver. The main use case was where Watir-Webdriver users were running into performance issues with large tables. The suggestion in those cases was to extract the HTML and parse it using Nokogiri. This gem was created to eliminate the need to learn the Nokogiri syntax, CSS-selectors, etc.

I think it would be hard to automate when it is worth reading the text with Watir-Nokogiri. As there is overhead in getting the browser HTML, the performance of just using Watir-Webdriver is often sufficient. Leaving it up to the script writer seems to be the right choice at this point, but I am open to suggestions.

AlexisKAndersen commented 9 years ago

The easiest way to implement this functionality would be to use watir-webdriver as a dependency for the gem, but that would obviously be a watir-webdriver specific solution and would not work for watir-classic. Do you think such an approach would be better taken as its own gem, or somehow not specify the dependency and let the user provide the one they need (if that's even possible)?

jkotests commented 9 years ago

Sorry, I am still struggling to understand how full Watir-Webdriver support could be added easily.

Though if there is an easy way to integrate Watir-Webdriver functionality with fast HTML searching, we should be implementing it in Watir-Webdriver rather than here.