I have a suite of selenium data driven testcases and I am trying to migrate my test data from Excel to Google Sheets, so apparently I need to use OAuth2. I have very little understanding in this area and am fairly new to programming with java.
I found this helpful link on stackoverflow: Create Spreadsheet using Google Spreadsheet API in Google drive in Java
Very helpful, HOWEVER, for some reason, Eclipse doesn't like the following line:
service.setOAuth2Credentials(credential);
Eclipse reports the following:
setOAuth2Credentials(credential) is not defined for the type SpreadsheetService.
There is a setOAuthCredential for type SpreadsheetService, but it takes 2 arguments instead of the one shown in the above example (taken from link).
My question is how can I get the example code to work (or at least compile)? Any suggestions or help would be greatly appreciated.