gemini-testing / gemini

💀💀💀[DEPRECATED] Use hermione
https://github.com/gemini-testing/hermione
MIT License
1.5k stars 149 forks source link

Ignoring multiple elements #876

Closed edgeandpearl closed 6 years ago

edgeandpearl commented 6 years ago

I need to capture an element with two other elements being ignored. Here's the code I use to do that:

gemini.suite('rubricator', suite => {
    suite
      .setUrl('/')
      .setCaptureElements('div#experts')
      .ignoreElements({every: ['span.muted', 'a.experts__single-link_show_more'] })
      .capture('');
  });

I pass the elements to be ignored as an array. However, I get an error: TypeError: suite.ignoreElements accepts strings, object with property "every" as string or array of them

How do I pass multiple arguments to ignoreElements()?

edgeandpearl commented 6 years ago

Okay, I tried ignoreElements({every: 'span.muted'}, {every: 'a.experts__single-link_show_more'}) and it worked.