Stuck with date picup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Stuck with date picup

Hardik Thakkar
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 [hidden email].
To post to this group, send email to [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Stuck with date picup

Munagala Srikanth
What is the Date format separator, send keys with separator too 

On Mon, Jun 18, 2018 at 7:16 PM, Hardik Thakkar <[hidden email]> 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 [hidden email].
To post to this group, send email to [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CALsF1KHvK4NZsO53q04_NakBZSgO4z%2BqiL0s2R%2BsAhtxPAtC6g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Stuck with date picup

total QA
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WgPwzflIBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">shree...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WgPwzflIBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">selenium-user...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WgPwzflIBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">seleniu...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/selenium-users/CAAFTTNYJQ2Rbe6x53kEw0SrDyRg_YLedBOdZjD3KWPUWhaTuEQ%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CAAFTTNYJQ2Rbe6x53kEw0SrDyRg_YLedBOdZjD3KWPUWhaTuEQ%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/selenium-users/CAAFTTNYJQ2Rbe6x53kEw0SrDyRg_YLedBOdZjD3KWPUWhaTuEQ%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/selenium-users/CAAFTTNYJQ2Rbe6x53kEw0SrDyRg_YLedBOdZjD3KWPUWhaTuEQ%40mail.gmail.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/94207de5-3a07-43ec-af04-a1d112603708%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Stuck with date picup

Hardik Thakkar
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

On Tue, Jun 19, 2018 at 12:04 PM, total QA <[hidden email]> wrote:
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 <[hidden email]> 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 [hidden email].
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.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/94207de5-3a07-43ec-af04-a1d112603708%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CAAFTTNbmROyjLr0STo9tFu8_Q2gOM4FroynVBsNUr6pGYQEExg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Screenshot 2018-06-19 00.27.17.png (33K) Download Attachment