I am using python with selenium for automation on windows.
I used inspect element to find a element and do some operation on it. It worked perfectly fine for me.
a= self.driver.find_element_by_xpath('//*[@id="dia2"]/p')
My colleagues followed the same method, but got a different xpath.
a= self.driver.find_element_by_xpath('//*[@id="dia4"]/p')
and his code didnt worked on his machine. When he repleaced dia4 with dia2- his code worked. Any idea, why we are getting different xpath from 2 different machines. We both used windows, same website, same element. What other factors determine xpath. I will check them on both machines.