Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | declare namespace Cypress { |
| 2 | interface Chainable { |
| 3 | selectDropdownOptionByText : typeof selectDropdownOptionByText; |
| 4 | } |
| 5 | } |
| 6 | |
| 7 | /************************************************ |
| 8 | select option with some text with select tag id |
| 9 | ************************************************/ |
| 10 | function selectDropdownOptionByText(selectId : string, optionText : string) : void { |
| 11 | cy.getElementByDataTestsId(selectId) |
| 12 | .select(optionText); |
| 13 | } |
| 14 | |
| 15 | Cypress.Commands.add('selectDropdownOptionByText', selectDropdownOptionByText); |
| 16 | |