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 isVisible command in new Element API #4037

Closed
5 tasks
garg3133 opened this issue Feb 22, 2024 · 16 comments
Closed
5 tasks

Add missing isVisible command in new Element API #4037

garg3133 opened this issue Feb 22, 2024 · 16 comments

Comments

@garg3133
Copy link
Member

Description of the bug/issue

The isVisible command is currently missing from the new Element API. To support this command, a new file named isVisible.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.

Moreover, we'd also need to have isDisplayed() as an alias to the isVisible() command.

Steps to reproduce

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

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

TODO

  • Add missing command
  • Add isDisplayed as an alias to isVisible() command
  • Fix JSDoc of the command
  • Add tests for the new command
  • Add types for the new command
@FireNdIce3
Copy link
Contributor

Can I take this issue?
Thanks

@subhajit20
Copy link
Contributor

hey @garg3133 can I get assigned for this issue?

@starvader13
Copy link

Hey @garg3133 , I can take this issue and fix it up. Can you assign this to me?

@PiyushThapaa
Copy link

@garg3133 Hey, I would like to work on it can you assign it to me...

@karan2198
Copy link

@garg3133 hello, I'm new to open source and eager to contribute. Could you please assign this issue to me?

@rumbleroii
Copy link

Hey, I would like to work on this issue. Could you assign it to me?

@Vaaruna2709
Copy link

Can I work on this issue?

Vaaruna2709 added a commit to Vaaruna2709/nightwatch that referenced this issue Feb 25, 2024
@Vaaruna2709
Copy link

Could you please review my PR?

@dikwickley
Copy link
Contributor

@Vaaruna2709 I think you have raised PR to the main branch of your own fork.

@Vaaruna2709 Vaaruna2709 mentioned this issue Feb 25, 2024
8 tasks
@srs-sudeep
Copy link

Hey, @garg3133 , I would like to work on it can you assign it to me...

@26vanshika
Copy link

Hey @garg3133, I would like to work on this can you assign me

@Ayush-Vish
Copy link
Contributor

@garg3133 I have worked on this issue and tested the isVisible and isDisplayed Commands.
Below is the Video for it.

2024-02-26.17-28-35.mp4

Please assign me this issue.
I just made two files which are isVisible and isDisplayed and both work as accepted

@Jai0401
Copy link

Jai0401 commented Feb 26, 2024

Hi @garg3133 ,

I've identified that the isVisible command is missing in the new Element API, causing errors when users try to use it. To address this, I've proposed a solution by creating a new file named isVisible.js, which includes the missing command and introduces a helpful alias isDisplayed. The implementation follows the existing commands' structure, including clear JSDoc. Could I take on this issue to contribute to the fix?

Thanks!

I am attaching some screenshots:
Screenshot 2024-02-26 at 10 11 41 PM
Screenshot 2024-02-26 at 10 12 03 PM

@Honey2339
Copy link

@garg3133 I've taken a look at issue and would like to contribute by solving it. It seems like a good issue to start off with. Looking forward to your guidance.

@sabinonweb
Copy link

Hey @garg3133 can i take this issue? Will like to contriburte,please assign it to me.

@garg3133
Copy link
Member Author

garg3133 commented Mar 8, 2024

Fixed in #4039

@garg3133 garg3133 closed this as completed Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests