# Problem with element BY.ID for autologin to kibana using python selenium webdriver

**URL:** https://discuss.elastic.co/t/problem-with-element-by-id-for-autologin-to-kibana-using-python-selenium-webdriver/322355
**Category:** Kibana
**Created:** [January 3, 2023, 8:47am UTC](https://discuss.elastic.co/t/problem-with-element-by-id-for-autologin-to-kibana-using-python-selenium-webdriver/322355 "2023-01-03T08:47:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Reka\_Novana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reka_novana/32/115482_2.png) [@Reka\_Novana](https://discuss.elastic.co/u/Reka_Novana)
#### Post date: [January 3, 2023, 8:47am UTC](https://discuss.elastic.co/t/problem-with-element-by-id-for-autologin-to-kibana-using-python-selenium-webdriver/322355/1 "2023-01-03T08:47:32Z")

</div>

I want to make an auto screenshot script using selenium python but I can't find element id of the username and password that I found is only random element id for username and password. Could you please inform me if I can do auto login to elastic kibana using selenium python? If it's possible, what parameter should I use for the username and password element id?

Thank you.

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [January 3, 2023, 11:52am UTC](https://discuss.elastic.co/t/problem-with-element-by-id-for-autologin-to-kibana-using-python-selenium-webdriver/322355/2 "2023-01-03T11:52:02Z")

</div>

Hi,

As there are no Ids there are 2 ways to do that:

1. Use the name instead of the id: [Docs](https://selenium-python.readthedocs.io/locating-elements.html#locating-by-name)
2. Instead of using the User Interface to Login you can also send the authentication as part of a Basic Auth Header. As Kibana does not allow user/password in the Url you need to use the browsers DevTools to do that. Here is a [Java example](https://medium.com/automationmaster/handling-basic-authentication-window-with-selenium-webdriver-and-devtools-api-ec716965fdb6) to do that with Selenium.

Best regards  
Wolfram

---

<div class="post-metadata">

### Author: ![Reka\_Novana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/reka_novana/32/115482_2.png) [@Reka\_Novana](https://discuss.elastic.co/u/Reka_Novana)
#### Post date: [January 19, 2023, 3:43am UTC](https://discuss.elastic.co/t/problem-with-element-by-id-for-autologin-to-kibana-using-python-selenium-webdriver/322355/3 "2023-01-19T03:43:14Z")

</div>

Thank you for helping me, i use "Name" for element and it works

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 16, 2023, 3:43am UTC](https://discuss.elastic.co/t/problem-with-element-by-id-for-autologin-to-kibana-using-python-selenium-webdriver/322355/4 "2023-02-16T03:43:18Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
