Sep-19-2017, 05:36 AM
i have written a code that picks data from excel enter into my offiice backend, in backend there is path where it needs to click submit button to enter entries
when i run this code it picks data for first row perfectly and when it reaches second row it select different xpath which i didnt mentioned in my codes
to submit the button there are two xpaths and those are :
when i run this code it picks data for first row perfectly and when it reaches second row it select different xpath which i didnt mentioned in my codes
to submit the button there are two xpaths and those are :
//[@id="editprojdetails_frm"]/table[2]/tbody/tr[9]/td/input[1] //[@id="editprojdetails_frm"]/table[2]/tbody/tr[10]/td/input[1]and this is my code
xid = driver.find_element_by_xpath('//*[@id="editprojdetails_frm"]/table[2]/tbody/tr[10]/td/input[1]|//*[@id="editprojdetails_frm"]/table[2]/tbody/tr[9]/td/input[1]') xid.click() time.sleep(2)it iterates through first row of my excel to pick data when it reaches to second column it selects :
//*[@id="editprojdetails_frm"]/table[2]/tbody/tr[9]/td[1]/inputbut it should select from above two xpaths where i used | this operator to join them, any suggestions?