i am using selenium web driver with python.In my test case i have a menu which opens a submenu(has mouse over so i am using action_chains to click) and when click on it moves to next screen.
in that screen i need to check save, delete, reset option function.but whenever i perform click on any of those button and it also clicks on that menu and displays the drop down menu.
this screen is not frame.so i am not able to use driver.switch_to_frame(frame_id). why i am getting this and what is the solution for this problem.
This my code:(is not one i am using but this is same with my code)
This is my main tab 1 2 3 4 (consider this all menu has submenu)
whatever new screen opens all displayed below this tab.this visible for all screens i am using.
menu= menu element
submenu= sub menu element
hover = ActionChains(driver)
hover.move_to_element(menu).click()
hover.click(submenu)
hover.perform()
Now a new screen opens which have save, reset options
now doing following:
1 st driver.find_element_by_id("field to fill").clear() driver.find_element_by_id("field to fill").send_keys(value)
2 nd driver.find_element_by_id("field to fill").clear() driver.find_element_by_id("field to fill").send_keys(value)
3rd driver.find_element_by_id("field to fill").clear() driver.find_element_by_id("field to fill").send_keys(value)
4 th driver.find_element_by_id("field to fill").clear() driver.find_element_by_id("field to fill").send_keys(value)
now i am clicking save button.
driver.find_element_by_id("save").click()