I’m wanting to test calendar integration with our business app. The use case goes like this:
User logs into our app and creates a new meeting
The meeting should populate Google Calendar within a reasonable timeframe
User should be able to verify the meeting is on their personal Google calendar
On the 3rd point above, I’m able to start a UI test with Katalon and land on the URL ‘https://calendar.google.com’. It asks the user to enter their email, and press next. I complete those steps and then Google tells me the browser session may not be secure. I suspect that’s their way of limiting automated web drivers from hammering their servers, or accessing data that you should not have access to.
It seems like some people have found a way to login to Gcal with Selenium, or Katalon WebUI but I can’t figure it out. I opened the devtools and didn’t see any non-200 status codes return.
See below for the code I’m using. I tried setting the user-agent in ChromeOptions with hopes that it would be perceived as a normal browser session (ie human). I may be oversimplifying things.
Thanks Russ for helping provide another avenue. I’ll investigate that as well.
Jvisser I’ve attempted both methods to see which worked (first and foremost) and then which caused fewer headaches. With the calendar API, I was successful setting up Postman through Oauth 2.0 and could query results, but I can’t get past the initial auth stage with Katalon. Opened a separate thread for that workflow:
Ideally I’d like to run somewhat of an E2E test through Katalon that does:
Login to our application through Web UI and create or edit a Meeting instance (can do)
Store meeting details through an API from our application (can do)
Validate the meeting populates Gcal within a reasonable timeframe (stuck)
Calendar integration through Nylas has proved problematic at times and I’m hoping to trace when / why that’s the case.
My issue is, not wanting to screw around with my gmail account – I’m using it for various services all day so I’m paranoid about Google stepping in and “protecting me” from some perceived hack attempt.
I did pretty much what you listed above, is all I can say. And as I said, it appeared to be working.
Before I started typing this response, I did a search and found the following – maybe it will help?
I’m assuming the same (or similar) API will allow access to Calendar.
Please note that my real account name is replaced to “my.account”
When I executed this, yes, it opened a Chrome browser, navigate to the URL “calendar.google.com”, the login form appeard. It typed “email@example.com” into the text field. Then Google responded with a display
The code I tried (posted above) seemed to work without issue.
Yes, I did. As I have already said, I am not prepared to test against my gmail account. I did not try to access Calendar. I tried the code I posted, going as far as I said and no more. It appeared to work.
I cannot know if it would have worked had I gone any further.
The OP may try to go further, like I said, that’s his job.