Stuck with date picup

22 views
Skip to first unread message

Hardik Thakkar

unread,
Jun 18, 2018, 1:04:57 PM6/18/18
to seleniu...@googlegroups.com
Hello Guys,

I have written the code to select the date month and year. Date and month are getting selected but there is an issue with the year.
Anybody can help me with this?

Here is a code:

     
     Thread.sleep(5000);
     WebElement sevadate = driver.findElement(By.xpath(".//*[@id='SevaCreateForm']/fieldset/div[2]/div[2]/div/div/div/input"));
     sevadate.click();
     sevadate.sendKeys("09022018");
     

Here is a html code :
<input class="form-control ng-touched ng-dirty ng-not-empty ng-invalid ng-invalid-date valid" type="date" valueasdate="" value="" pattern="dd/MM/yyyy" ng-model="selectedSeva.sevaDate" name="SevaDate" aria-invalid="false"/>

Thanks,
Hardik

Munagala Srikanth

unread,
Jun 19, 2018, 2:02:21 AM6/19/18
to seleniu...@googlegroups.com
What is the Date format separator, send keys with separator too 

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAAFTTNYJQ2Rbe6x53kEw0SrDyRg_YLedBOdZjD3KWPUWhaTuEQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

total QA

unread,
Jun 19, 2018, 2:34:54 AM6/19/18
to Selenium Users
Hi,

Try with providing the date and delimiter as DD/MM/YYYY . this is how we enter the date manually as a end user.

Regards,

On Tuesday, June 19, 2018 at 11:32:21 AM UTC+5:30, Munagala Srikanth wrote:
What is the Date format separator, send keys with separator too 
On Mon, Jun 18, 2018 at 7:16 PM, Hardik Thakkar <shree...@gmail.com> wrote:
Hello Guys,

I have written the code to select the date month and year. Date and month are getting selected but there is an issue with the year.
Anybody can help me with this?

Here is a code:

     
     Thread.sleep(5000);
     WebElement sevadate = driver.findElement(By.xpath(".//*[@id='SevaCreateForm']/fieldset/div[2]/div[2]/div/div/div/input"));
     sevadate.click();
     sevadate.sendKeys("09022018");
     

Here is a html code :
<input class="form-control ng-touched ng-dirty ng-not-empty ng-invalid ng-invalid-date valid" type="date" valueasdate="" value="" pattern="dd/MM/yyyy" ng-model="selectedSeva.sevaDate" name="SevaDate" aria-invalid="false"/>

Thanks,
Hardik

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

Hardik Thakkar

unread,
Jun 19, 2018, 8:16:32 AM6/19/18
to seleniu...@googlegroups.com
I tried multiple times, that code is only working for date and month but not for the year.

In FF I am not seeing the date picker but in chrome, I am seeing date picker with the drop-down.

PFA screenshot!

Thanks,
Hardik

To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/94207de5-3a07-43ec-af04-a1d112603708%40googlegroups.com.
Screenshot 2018-06-19 00.27.17.png
Reply all
Reply to author
Forward
0 new messages