From a342ff53bd3c10e5436335b143318271b5a2b36a Mon Sep 17 00:00:00 2001 From: Adrian Short Date: Tue, 25 Sep 2018 14:51:23 +0100 Subject: [PATCH] Idox: searchCriteria.caseType and searchCriteria.developmentType are two separate things We need to test a group of Idox sites to see how these parameters are used in practice. --- lib/uk_planning_scraper/idox.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/uk_planning_scraper/idox.rb b/lib/uk_planning_scraper/idox.rb index 84760d1..fd23eb6 100644 --- a/lib/uk_planning_scraper/idox.rb +++ b/lib/uk_planning_scraper/idox.rb @@ -45,8 +45,9 @@ module UKPlanningScraper form.send(:"searchCriteria\.applicantName", params[:applicant_name]) if form.has_field? 'searchCriteria.applicantName' form.send(:"searchCriteria\.caseType", params[:application_type]) if form.has_field? 'searchCriteria.caseType' - # Some Idox sites (eg Bolton) call this 'searchCriteria.developmentType' - form.send(:"searchCriteria\.developmentType", params[:application_type]) if form.has_field? 'searchCriteria.developmentType' + + # Only some Idox sites (eg Bolton) have a 'searchCriteria.developmentType' parameter + form.send(:"searchCriteria\.developmentType", params[:development_type]) if form.has_field? 'searchCriteria.developmentType' page = form.submit