We have automation test scripts (Around 70) written using selenium web driver for Salesforce classic and able to execute without any error.
Now we are moving into Salesforce lightning, when I am trying to execute same automation test scripts (Around 70) on lightning throws error with respect to finding elements .
After investigating the error came to know that elements html tags are different in lightning compared to classic.
Please find below information.
Eg :In New LEAD Object ,
In Salesforce classic - LastName field Xpath is -- >input[@id='name_lastlea2']
In Salesforce lightning - LastName field Xpath is -- > //input[@id='450:2948;a']
Please let me know what approach I should do now to execute all my 70 test cases without any errors in Salesforce lightning.
My scripts should run in both Salesforce classic and lightning.
Thanks in advance .