Currently im working on automating a website with selenium python. I have this problem whereby when i enter J590
into the target textbox
MANUALLY, i will have to click anywhere on the website or pressing tab which than will refresh the website and an option will be available in a dropdown box. However, selenium does not seem to be refreshing the page for me.
I tried to use click()
before and after sending J590
into the textbox
,i also tried using send_keys(Keys.TAB)
after sending J590
but none is working.
Here is the code i used to send inputs
driver.execute_script("document.getElementById('CustCd').value+="+ dumps(jcode))
Here is the code i tried after sending input
driver.find_element_by_xpath('//*[@id="Item"]/form/center/input[2]').click()
or
driver.find_element_by_xpath('//*[@id="CustCd"]').send_keys(Keys.TAB)
May i know why is selenium acting this way and is there a solution to it.