Current time: 10-22-2020, 08:36 PM Hello There, Guest! (LoginRegister)

Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script not working
05-24-2018, 09:06 PM
Post: #1
Script not working
Hi Respected Members,

Apologies if it is not the right board to post this query
also if this question is already asked [unfortunately I couldn't find it..plz refer me ]

I am working on react application...using a private instance of WPT.

This is my targetted script flow.
page -1
launch app : navigate <URL>
click on the login button : execAndWait document.querySelector('.wds-c-navbar a[href="#/login"] .wds-c-button').click()

page -2
enter credentials : exec document.querySelector('.wds-c-form-item input#username').value="username"
exec document.querySelector('.wds-c-form-item input#password').value="password"
click login : execAndWait document.querySelector('button.wds-c-button--success[type="submit"]').click()

page -3
click a button [on logged in dashboard] : execAndWait document.querySelector('.wds-c-button--primary’).click()

I am using javascript commands to achieve this.

The problems I m facing whenever I navigate to a new page I m unable to run actions.
i.e after clicking on the login button on page-1, it takes me to page-2 where I can enter credentials and click the login button. here I m not able to click on login button.

but when I navigate to page-2 directly using navigate, the same click on login button is working.

Any help would be highly appreciated. Please let me know what I m missing.
Find all posts by this user
Quote this message in a reply
Post Reply 

Forum Jump:

User(s) browsing this thread: 1 Guest(s)