Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing isSelected command to new Element API #4036

Closed
4 tasks
garg3133 opened this issue Feb 22, 2024 · 5 comments · Fixed by #4038
Closed
4 tasks

Add missing isSelected command to new Element API #4036

garg3133 opened this issue Feb 22, 2024 · 5 comments · Fixed by #4038
Assignees

Comments

@garg3133
Copy link
Member

Description of the bug/issue

The isSelected command is currently missing from the new Element API. To support this command, a new file named isSelected.js needs to be added inside lib/api/web-element/commands directory, whose content should be similar to the get* command files present in the same directory.

The argument passed to this.runQueuedCommandScoped in these files is the name of the corresponding method to be called from the lib/transport/selenium-webdriver/method-mappings.js file.

Steps to reproduce

Go to any test file and try to add const result = await browser.element('<selector>').isSelected() and then run the test. This would result in an error right now, while if you replace isSelected() with getText(), it should work fine.

After adding the command implementation, the .isSelected() command should work fine and return a boolean promise.

TODO

  • Add missing command
  • Fix JSDoc of the command
  • Add tests for the new command
  • Add types for the new command
@niladrix719
Copy link

can i work on this?

@dikwickley
Copy link
Contributor

@garg3133 can you point me somewhere where I can refer to add tests for this?

@aditya123473892
Copy link

can i work on this issue if it has not been fixed or assigned to anyone

@garg3133
Copy link
Member Author

Assigning this to @dikwickley since they already have a PR on this which seems to be almost complete (just the tests are remaining).

@PiyushThapaa
Copy link

@garg3133 If this issue is not solved I would like to work on it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants