How to fake Browser my system time using selenium | Selenium Forum
M
Posted on 10/01/2017
Hi Ashish,

I am working on banking application.

Here is the scenario:

I have a application dashboard & where i can search the Transactions made for particular time interval.

Here i need to automate the scenario:

1> I have transactions made between 1/jan/2016 to 1/jan/2017.
2> If i change the system time to some old date, example: 1/Aug/2016 & make a search the search results are displayed for transactions made before 1/aug/2016. I mean search is working based on my system date.
3> Now the Developer fixed this issue. Even though the user change his system date the search results will be picked from server date & time

So i need to test this scenario.

Wanted to know how do i change my system date using selenium or else how can i fake my browser my system date & time.

I have a situation where I need to change the system time programatically using Java. Is there any way to do it with Java or Selenium?

M
Replied on 11/01/2017

what you're asking is out of the scope of selenium.

but java might work. you'll have to google how to do it.