CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

asserting select dropdown values

Open dsypien opened this issue 9 years ago • 8 comments

I want to assert the values of select fields. Is there an easy way to do this in codeceptjs? I've been looking through the documentation and I can't find an equivalent of the seeInField function that works for select dropdowns.

I am using webDriverIO.

Thanks, David

dsypien avatar Dec 15 '16 19:12 dsypien

I think you would have to make your own Helper (http://codecept.io/helpers/), get the client you are using with this.helpers['client'].browser (like here http://codecept.io/helpers/WebDriverIO/#access-from-helpers) and check the client documentation.

For example Webdriver.io http://webdriver.io/api.html have a getValue that could work for select elements.

divad4686 avatar Dec 16 '16 11:12 divad4686

Thanks @divad4686, created a helper. It works great 😄

dsypien avatar Dec 16 '16 21:12 dsypien

@dsypien if you think your method is valuable please send pull request and we will include that into next release.

DavertMik avatar Dec 16 '16 21:12 DavertMik

@DavertMik great 👍 I'll create a pull request

dsypien avatar Dec 19 '16 15:12 dsypien

Any chance it gets part of codeceptjs helpers ?

svassr avatar Jul 24 '19 17:07 svassr

Is it part of codeceptjs now? If it is what is the method name?

gurpreetsainisalesforce avatar Oct 16 '19 22:10 gurpreetsainisalesforce

@DavertMik great 👍 I'll create a pull request

Any updates on this? How can we call this functionality if it's been included in current releases?

auto-qa-git avatar Jan 29 '20 20:01 auto-qa-git

Hi guys! Just wondering if this got implemented in the end. If yes, please be kind and write the method name? 10Q

eugengaspar avatar Oct 14 '20 11:10 eugengaspar