Bug report - img@src fails but alt works #31

Open
opened 2025-10-14 18:01:54 -06:00 by navan · 0 comments
Owner

Originally created by @sabatale on 3/13/2021

Describe the bug
img@src returns no value while img@alt for the same selector is working.

Expected behavior
img@src should return a link.

Actual behavior
img@src returns no value at all.

Working example code

<div id="#result" class="other-container">
  <a class="photo-container photo-1" onclick="event.preventDefault();addDataLayerPhotoViewer(16235957, 'Summary');initPhotoGallery('en', '16235957', true, '999', 2)" href="" role="button">
    <img class="" alt="My text" style="display: flex;" src="https://domain.com/media.ashx?id=ADDD250D2B6DBD6DD60939ED4B&amp;t=pi&amp;w=820&amp;h=440&amp;sm=c">
  </a>
</div>
x('https://domain.com/abc', '#result',
  [{
    img1 '.photo-1 img@src'
  }]
)

Environment:

  • OS: Windows 10
  • Version @latest
*Originally created by @sabatale on 3/13/2021* **Describe the bug** img@src returns no value while img@alt for the same selector is working. **Expected behavior** img@src should return a link. **Actual behavior** img@src returns no value at all. **Working example code** ``` <div id="#result" class="other-container"> <a class="photo-container photo-1" onclick="event.preventDefault();addDataLayerPhotoViewer(16235957, 'Summary');initPhotoGallery('en', '16235957', true, '999', 2)" href="" role="button"> <img class="" alt="My text" style="display: flex;" src="https://domain.com/media.ashx?id=ADDD250D2B6DBD6DD60939ED4B&amp;t=pi&amp;w=820&amp;h=440&amp;sm=c"> </a> </div> ``` ``` x('https://domain.com/abc', '#result', [{ img1 '.photo-1 img@src' }] ) ``` **Environment:** - OS: Windows 10 - Version @latest
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/x-ray#31
No description provided.