I have multiple test cases, for which i have respective monkeyrunner scripts. The thing i fidn with monkeyrunner is that in my case it becomes device dependant, as i record coordintes for my sequence of events. I have major issues as when i work, I do not get the same device always to test, as a result i end up making scripts for each device which is a lot of re-work. I new to python, so I was wondering if there is a way where i can keep the coordinates in a separtate file and my script generic, where in i can create multiple coordinate files to run with the same python code. How to do that
print "Initiating Calling process"
device1.touch(688,1620,'DOWN_AND_UP')
MonkeyRunner.sleep(4)
#Dialer
print "Opening Dialer"
device1.touch(536,1694,'DOWN_AND_UP')
MonkeyRunner.sleep(2)
device1.touch(526,664,'DOWN_AND_UP')
MonkeyRunner.sleep(4)
device1.type(ph_nmber_1)
#Device 1 calling
print "Calling from Device 1"
device1.touch(536,1562,'DOWN_AND_UP')
MonkeyRunner.sleep(4)
device1.touch(536,1562,'DOWN_AND_UP')
MonkeyRunner.sleep(8)
for example this above code is for a particular device coordinates are according to that device how can i remove the hard coding of coordinates?