Guest User

Untitled

a guest
Nov 19th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. it('Demo Test, () => {
  2.  
  3. // Submit the form and get the transaction number
  4. var submitButton = element(by.id('submit'));
  5. submitButton.click();
  6.  
  7. // get the generated transaction number from the screen
  8. let transactionNum = confirmPage.getTransactionNum();
  9.  
  10.  
  11. // would like to use the transActionNum variable to sendkeys into a
  12. // text element
  13. var searchInput = element(by.id('search'));
  14. searchInput.sendkeys(transactionNum);
  15. });
  16.  
  17. var transactionNumValue = element(by.id('transactionNumber'));
  18.  
  19. public getTransactionNum(): any {
  20.  
  21. this.transactionNumValue.get().getText().then((transactionValue: string)
  22. => {
  23. return transactionValue;
  24. });
Add Comment
Please, Sign In to add comment