Current time: 08-23-2019, 11:04 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Scroll of a page
08-21-2019, 05:34 PM
Post: #1
Scroll of a page
Hi,

-> I am running a test on private instance WPT . Test fails after step 4 and does not execute second scroll option,logout.

-> I tried in the console with the same code and it worked fine. I also tried with different actions removing scroll option, failed to achieve.

-> Only 4 steps get executed everytime and test stops.

-01_Launch
-02_Click_Login
-03_ScrollDown_up
-04_Search_Text
-05_ScrollDown_up
-06_Logout

I have used the following script to access the page:

//Set resolution and Launch Url
logData 0
setViewportSize 1920 1080
logData 1
setEventName 01_Launch
navigate https://example.com/login

//Accept cookies
logData 0
clickAndWait class=optanon-allow-all

//Login
logData 0
exec $("form input[type=text]").val('username');
execAndWait $("form input[type=password]").val('password');
exec var event = document.createEvent("HTMLEvents");event.initEvent("input",true,true);$("form input")[0].dispatchEvent(event);$("form input")[1].dispatchEvent(event);

logData 1
setEventName 02_Click_Login
execAndWait $(".form-group.mt-4").find("button").click();

//Scroll down
logData 1
setEventName 03_ScrollDown
execAndWait window.scroll({top: 250, left: 0, behavior: 'smooth'});

//Scroll up
logData 0
execAndWait window.scroll({top: 0, left: 0, behavior: 'smooth'});

//Search Keywords
logData 0
execAndWait $(".flex-container.search-container").find("input").val('sports');
logData 1
setEventName 04_Search_text
clickAndWait id=btnSearch

//Scroll down
logData 1
setEventName 05_ScrollDown
execAndWait window.scroll({top: 250, left: 0, behavior: 'smooth'});

//Scroll up
logData 0
execAndWait window.scroll({top: 0, left: 0, behavior: 'smooth'});
//Logout
logData 0
clickAndWait class=ico-bars ico-lg link-light no-arrow-down

//Logout
logData 1
setEventName 06_Logout
clickAndWait id=btnLogout

Can anyone help me out for this

Thanks
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


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