Unable to clear a (material ui 5) datepicker field on Firefox - works fine on Edge and Chrome
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unable to clear a (material ui 5) datepicker field on Firefox - works fine on Edge and Chrome
We have several date fields in our system, implemented using Material UI 5.10.2 datepicker. Our system is tested on Edge, Chrome and Firefox.
We have some tests that clear the text component part of the datepicker field using SetText("").
This is working fine on Edge and Chrome however on Firefox it does not clear the field. I have also tried using Keys("") followed by a Keys("[Tab]"], which does not work either
Has anyone else come across this or anything similar to this?
Any ideas how I can clear the field in Firefox?
Thanks
Solved! Go to Solution.
- Labels:
-
Script Tests
-
Web Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Actually, .Keys("") does nothing, so I am not surprised that the field is not cleared. (To press Space key you should call .Keys(" ") -- space between quotes.)
What if you give a try to something like:
obj.Click(); // to set input focus into control;
obj.Keys("^A"); // Control-A to select all text (or "[Home]![End" -- Home, then Shift-End for the same purpose, or anything else that will select all text within control
obj.Keys("[Del]"); // Delete to clear the control
Does it help?
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Alex.
obj.Keys("^A"); didn't work for me on Firefox, it opened a new tab with showing add-ons
however, this did work.
obj.Click();
obj.Keys(" "[Home]![End]")
obj.Keys("[Del]");
