0

Wanted to ask, I want to do something like this via eclipse's find and replace function

driver........click();
driver........click();

after find and replace

driver........click();
Thread.sleep(2000);
driver........click();

is this possible? If so, how do i do it? Many thank for the help!

1 Answers1

0

I don't use Eclipse very often, but it looks like Eclipse supports regular expressions in the search and replace feature.

Something like this will probably work:

Search: (driver.*click\(\);)\r?\n(driver.*click\(\);)

Replace: $1\r\nThread.sleep\(2000\);\r\n$2

Also, be sure to check the Regular expressions checkbox in the options section before running this search.

Community
  • 1
  • 1
Daws
  • 692
  • 4
  • 11