Forum Discussion
- KB1Champion Level 2
To interact with a text editor element on a webpage using Cucumber, you can try using one of the following keywords:
fill_in: This keyword is used to enter text into a form field or textarea element. You can use it by specifying the name, label, or ID of the text editor element and the text that you want to enter. For example: fill_in "Description", with: "Enter text here"
set: This keyword is similar to fill_in, but it is more flexible and can be used to set the value of any element on the page, not just form fields or textareas. You can use it by specifying the element that you want to interact with and the value that you want to set. For example: set "Description", to: "Enter text here"
editor_fill_in: This keyword is specific to the capybara-cucumber gem, which adds additional keywords and functionality to Cucumber for interacting with web pages. It is similar to fill_in, but it is designed to work with rich text editors that use contenteditable elements. You can use it by specifying the element that you want to interact with and the text that you want to enter. For example: editor_fill_in "Description", with: "Enter text here"
- Saaikrishna114New Contributor
Thank you for your response,
but those are not working for p-editor.
Related Content
- 5 years ago