diff --git a/lib/xpath/html.rb b/lib/xpath/html.rb index 2c22fe9..e52de95 100644 --- a/lib/xpath/html.rb +++ b/lib/xpath/html.rb @@ -88,7 +88,7 @@ def select(locator) # Label, id, or name of the checkbox to match # def checkbox(locator) - xpath = locate_field(descendant(:input)[attr(:type).equals('checkbox')], locator) + locate_field(descendant(:input)[attr(:type).equals('checkbox')], locator) end diff --git a/lib/xpath/renderer.rb b/lib/xpath/renderer.rb index 2b35cf5..71186dd 100644 --- a/lib/xpath/renderer.rb +++ b/lib/xpath/renderer.rb @@ -105,8 +105,8 @@ def literal(node) end def css(current, selector) - paths = Nokogiri::CSS.xpath_for(selector).map do |selector| - "#{current}#{selector}" + paths = Nokogiri::CSS.xpath_for(selector).map do |xpath_selector| + "#{current}#{xpath_selector}" end union(paths) end