selenium-ide icon indicating copy to clipboard operation
selenium-ide copied to clipboard

Verify Field Placeholders using Selenium IDE

Open hazelbucks opened this issue 5 years ago • 5 comments

I want to verify the placeholders in all fields on my webpage before I populate them. The verifyAttribute and assertAttribute are not in the Command Dropdown. Can someone explain why these are not present? Additionally, how do I validate placeholders without this command?

I am also open to using a workaround like storeAttribute and then validating the value stored in this attribute but I am not sure how to do that either.

Example:

Validate the Full Address field has a placeholder of "Search Address ..." image

Expected behaviour

Verification required to check the placeholder in the text field matches the placeholder I put in the value field image

Environment

Selenium IDE Version: Googel Chrome Browser Version 83.0.4103.97 (Official Build) (64-bit)

hazelbucks avatar Jun 19 '20 01:06 hazelbucks

verifyAttribute and assertAttribute are old comands from the old IDE. They are Not avaible in the new IDE (you can add them via a Pull Request of you want)

store value won‘t work because the „placeholder“ is not an value.

try store attribute, see my example image

store attribute with placeholder.side.txt

capoerafreak avatar Jun 19 '20 07:06 capoerafreak

That's worked perfectly, thank you!

hazelbucks avatar Jun 22 '20 22:06 hazelbucks

I'm reopening because I feel like we should have a dedicated command for it.

corevo avatar Jun 23 '20 09:06 corevo

Other than echo, is there a way to let the test fail like the verify command when the condition doesn't satisfy, and then it can still move onto the next test after? Appreciate it!

verifyAttribute and assertAttribute are old comands from the old IDE. They are Not avaible in the new IDE (you can add them via a Pull Request of you want)

store value won‘t work because the „placeholder“ is not an value.

try store attribute, see my example image

store attribute with placeholder.side.txt

zcai2023 avatar Jul 26 '24 18:07 zcai2023

@zcai2023 - Sorry, we've talked about it before. A try-catch thing would be very useful:

https://github.com/SeleniumHQ/selenium-ide/issues/1668

toddtarsi avatar Jul 26 '24 19:07 toddtarsi