Selecting Calendar Control in Edge using Selenium - selenium-webdriver

I am trying to select a date from a date picker in MS Edge using Selenium. I have tried the following:
DateTime today = DateTime.Today;
string s_today = today.AddMonths(2).ToString("MM/dd/yyyy");
IWebElement endDate= Browser.Driver.FindElement(By.CssSelector("input[type='date']")); endDate.SendKeys(s_today);
And I even tried to create a method that takes that date reformats it and then sends that date to the date picker control
string dt = String.Format("{0:MMddyyyy}", s_today);
endDate.SendKeys(dt);
endDate.SendKeys("{Tab}");
I cannot seem to seem to select a date. I reviewed the link below and found nothing. Please help me. This is a ReactJS web app. Attached are screen shots.
How to automate selection of a particular date from calendar in selenium using java
Date Picker in Edge
DOM for Date Picker

I know this is a late answer but this is a confirmed bug in the Edge implementation of those particular input types.
Refer to the Cannot SendKeys on input control bug report on the edge bug tracker.
You can work around the problem by using JavascriptExecutor in selenium, or directly calling /session/:sessionId/execute and injecting your script in the Http request.
Regardless, at the moment it boils down to implementing your own sendKeys in javascript and injecting the javascript using selenium.

Related

Using intermediate appPage xpages mobile

I have a simple issue, but I don´t how to solve the problem.
Using XPages Mobile controls, I have a document with some actions, and one of them is "Send to Signature".
The workflow is: select the signer of document (from names) and send to signature.
I need to show for the current user, one field to select the signer (I already have a field with typeahead funcion to select him).
I would like to use an intermediate appPage for this, but when I´m in the new appPage, the currentDocument is gone.
How can I use the same document (opening from a dataView) for solve this problem?
Can I navigate between appPages (inside SinglePageApp) using the currentDocument??
Thanks in advance
It might be worth looking at Mobile Value Picker on OpenNTF. The mobile prefix may need setting in XSP Properties to "Mobile_" (or it could be that I messed around with the development version after the last upload). But it gives code to have a button / link to go to a subsequent appPage to select values from a list. It starts from a DataView, to a document, to the selection page.
The project has not changed for a couple of years, but I've just tested it in Chrome setting user agent to Android and it still seems to work fine on 9.0.1 FP2.

How do you create date and time picker in onsenui?

How do you create date and time picker in onsenui?
I couldn't find any thing in their documentation and don't even know where to start.
You can also use html5 attribute like date and time to create datepicker in onsenui. for example
<input type="date" class="text-input" ng-model="inputDate"/>
You can look more details in here
The easiest way is to use Monaca, the browser based IDE from the same OnsenUI's company. You can find how to add this dateTime picker in their document. This will work for both iOS and Android. You can also add OnsenUI and PhoneGap DateTime Picker plugin right from the IDE. Therefore, you don't need to add the plugin one by one. Below is the screenshot of the OnsenUI with Datetime Picker:
https://www.dropbox.com/s/bgmk7b3e90nf75k/2014-09-02%2014.06.38.png?dl=0
Here is how to add the dateTime picker for Android.
I hope this helps. Cheer.

Google Calendar API V3 - New events are not returned

I am working on a Windows 8 app which is using Google Calendar API V3.
Until last week, I was able to add and retrieve events of my agenda directly from this App.
But, for no reason, the Google Calendar API doesn't send me anymore new events and events that I've added recently in my agenda even if I add an event directly from the Google Calendar website. Hovewer, I still receive old events.
I use this request : https://developers.google.com/google-apps/calendar/v3/reference/events/list and get the same result in their generator and in my apps.
Does someone have an idea of what is going on ?
Thanks ! :)
I think,it is related to pagination issue once try to set maxResults parameter or use pageToken parameter
Please check the calendar permissions first.

Forward to jsp from java script method not working for browser

I am using ExtJs 4.2. In my java application I am using the ExtJS calendar (I am using Eclipse Indigo IDE for developement) in one of my JSP.
Now I am getting a pop up to save the event when I click on any date in month format. But I want to display one of my custom JSP when clicked on any day on the ExtJS calendar instead of the pop up which is another JavaScript file.
So I changed in App.js file present in examples/calendar/src folder to get the required JSP. I changed in
showEditWindow : function(rec, animateTarget)
method and instead of the function body where the pop up was coming I wrote the line
window.navigate("my jsp path in eclipse")
It is working fine if I am executing the file in my Tomcat server using Eclipse browser. But if I use any other browser then the functionality is not working (i.e nothing happening when I am clicking on the date).
I am totally new to JavaScript environment. So even if a small or any other suggestion also can be helpful.
So pls anybody help me out here...
Regards
Dev
window.navigate() is an IE specific implementation and its not a standard way of doing it. It will not work on all browsers.
Use window.location.href instead
Instead of window.navigate("my jsp path in eclipse"); ,
Use window.location.href = "my jsp path in eclipse";

How do I get selected date with YUI calendar if no javascript fallback

Please be gentle, I am perplexed I can't figure this out...
I was told to use the YUI library because it is the most accessible library and that it provided fallback when JavaScript was not enabled. I cannot figure out how I would get the selected date for a calendar widget when JavaScript is not enabled. Nothing seems to be posting on submit.I tried to bind to an input box instead of a div but it just ignored the binding.
If JavaScript is enabled I can just push the selected value to an input box.
Is this widget the exception to the rule since it binds to a div or is there a secret way to find out what the user has selected with JavaScript not enabled?
Many YUI widgets are designed to enhance existing HTML, and fall back to something useful even if JS is turned off or broken. For example, a YUI TabView's core markup is a list of links; if you break JS, you still have those working links to click on.
But YUI Calendar is not a form element in and of itself -- instead you should think of it as an enhancer for form elements. Your instinct to attach it to an input element is the correct one. The good news is that the YUI gallery has a popup calendar, built on top of the base calendar, which is designed to bind to elements and appears below the element when the user focuses there.
This is a classic progressive enhancement scenario. If the user has JS, they get a fancy calendar. If not, they can still fill out the plain input field -- no harm done.

Resources