matthewmueller / matthewmueller/x-ray

Name selector not working

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.9k
Forks
342
PR merge metrics
No merged PRs in 30d

Description

I am trying to select using the name attr on a select element. There are a total of 3 selects on the page. All are returned

<select name="psSelectedSeason">
     <option value="4952083">2007-08</option>
</select>

WIth the following:

    x('http://full-time.thefa.com/Index.do?league=9031785', 'select[name='+name+']', {
        name: '@name',
        options: x('option', [{
            text: '@text',
            value: '@value'
        }])
    })(function(err, data) {
        return done(data);
    });

Should this selector work :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the supplied example against the linked URL using the selector select[name='+name+'], then inspect how x-ray handles attribute selectors and nested option extraction. Done means the selector distinguishes the named select and returns its name and option data rather than all three selects.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.