I can change date on web page if I use internet explorer with below code(code1). however, I changed browser to chrome with selenium. (as code 2), date section on web page is changed but it is partial. for example: date is set 18/02/2020 on web page when it is opened. then I want to change date as 01/03/2017 but it is changed to 03/02/2017. that means, month section in macro shanged the date section, nothing changed on month section and year section is also changed
i have tried to change date order in macro like mm/dd/yyyy but ı cant get a proper date solution. just tried millions of code and still cannot find anything.
so please help me to change date section on chrome with using selenium. Sheet1.Range("A1") = 01/03/2017 Code1
ie.document.getElementsByName("date$From")(0).Value = Sheet1.Range("A1").Text
Code2 (selenium and VBA)
obj.FindElementById("date_From").SendKeys (sheet1.Range("A1")).Text
Website code (website is behind a firewall)
<input name="date$From" type="text" value="18/02/2020" size="6" id="date_tbFrom" class="searchSelect">
<input type="hidden" name="date_From_Client" id="date_From_Client">
obj
is a reference to the Selenium driver, this should do it:obj.FindElementById("date_tbFrom").SendKeys(Sheet1.[a1].Text).Submit
– Excel Hero<input name="date$From" type="text" value="18/02/2020"
there is an obvious value if there is a way to just replace it, it would be better. – SelpaqM