I have a project with many classes.
I wish to replace this command:
a.Dosomething();
by this one:
((JavascriptExecutor) driver).executeScript("click();", a);
(when a in the first command is the same in the second)
I read this answer: Eclipse Replace text in all Classes?
But this is not possible with variable. There is a easy way to do it?
If I am getting your question right, you just want to replace all occurrences of
a.Dosomething();with((JavascriptExecutor) driver).executeScript("click();", a);.You can try using “Search”-> “File…”-> Enter the text you want to in
Containing text:set the
File Name Patternto *.Set
Scopeto Worskpacethen hit
Replace...you can enter your new text. You can alsoPreviewall the places that will be affected. Finally hitOK.