-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add headless support for echo360 cloud #21
base: master
Are you sure you want to change the base?
Add headless support for echo360 cloud #21
Conversation
Hi @overclockedllama thank you for your prompt PR. I wasn't sure if you noticed, but the reason For example, my university uses office365 to manage its login system. Therefore, after the webdriver.find_element_by_xpath('//*[@id="email"]').send_keys(username)
webdriver.find_element_by_xpath('//*[@id="submitBtn"]').click() it redirects the page to the office365 login system and subsequently causes the webdriver.find_element_by_xpath('//*[@id="password"]') fails as that element wasn't presents. |
Oh right, maybe we could add a new flag called headless or headless-cloud or something like that? |
But the proposed implementation does not work in general, because the PR expects the login page has certain elements (i.e. |
What does yours look like? |
Hi @overclockedllama I don't believe that is true, where it is not dependent on hostname (like The I found this old youtube video about the echo360 system, and (while the interface is the older version) it showcases the login system in a more explicit way.
|
Ok that makes sense. So if I want to setup a headless mode for those academic institutions that use echo360 login, not academic institute login. What would the best way of doing that be? I feel like the only way is to add a new flag like What do you think the best way to add headless support for echo logins is? I don’t think it’s possible to add headless support for other academic institutions |
I guess the most suitable way is to first detect if login can be completed via terminal; and if not, proceed to spawn a browser GUI. This is similar to the approach previously for the non-cloud platform. Previously, if the module detected that username/password field exists, then it will prompt to ask for username and password. If not, it will prints out the See Line 131 in a3a6753
and Line 106 in a3a6753
|
Check the demonstration video at this timestamp It dynamically prompts for asking Line 143 in a3a6753
This would makes your PR compatible for all institutions (where browser would only be needed as a fallback). |
I'm not really sure what to do then. All I can say is that to login I need to put the username in the email field, click submit, put the password in the password field, and click submit. If the user does not input username and password, it lets them use the fallback option of logging in by themselves |
Some comments are:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="password"]"}
(Session info: headless chrome=81.0.4044.138)
(Driver info: chromedriver=2.38.552522 (------------------------),platform=Linux 4.14.180-1-SYSTEM x86_64) which would create confusion. Instead, it should fail gracefully with message that indicates if it is due to invalid username, password, or because it needs SSO from the institution. You can detect that by the field existences (see the files I previously suggested which had a similar approach). Then, you can choose to either (i) gracefully exit with error, or (ii) fallback automatically and spawn a GUI browser.
|
d1db99f
to
7939129
Compare
No description provided.