Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

grabAttributeFrom returns just a part of element attribute

Open
#5,371 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
47/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
testing-qa

Research direction

Start at the grabAttributeFrom entry point and reproduce the reported case with a style attribute containing a colon and spaces. Verify that the result preserves the complete attribute value, including the CSS declaration, and check the existing browser-driver behavior used by this helper.

Written by the indexing model from the issue text.

Description

stale

I'm trying to return and assert the element style, which looks like that:
<div class="carousel-slides" style="transform: translateX(-200%);">
... but the call
styleBefore = await I.grabAttributeFrom(selectors.index.homeSection.carouselSlides, 'style');
... finishes with value 'transform' and everything behind, including ":", is not returned, exactly the call of
console.log('LOG: styleBefore:', styleBefore );
... produces this:
> LOG: styleBefore: { '0': 'transform' }
... so I cannot get to the value and am practically unable to scan what picture is displayed on the carousel.

As I control the codebase, I added an attribute slide="" for testability, which reflects the slide number... and this works well, but complicated values with ":" or space make a problem.

Dominant language
JavaScript
Stars
4.2k
Forks
756
Avg merge
2d 9h
Merged PRs (30d)
16

Contributor guide

Open the contributing guide

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.

More from codeceptjs/CodeceptJS

All issues in codeceptjs/CodeceptJS

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.