1

I am wondering if anyway to retrieve function of the button after click in order to code in python using the selenium?

The website I'm working with, is the website relates to data analytic, the GUI is full of buttons to click in order to query (SQL base) database and allow user to download csv after done querying.

In python ide (import Selenium), I can code, in order to automate cursor to click on those buttons, but I don't know how can I retrieve the code functions embed for those buttons.

For example In the GUI, there is a button "query" to press, which I know this is to trigger database querying after I have done selecting preconditions, but how do I know what is the info for this button (Ex. which server, database, tables are being pulled or how SQL command is generated and sent to which destination) when I use "inspect" from the browser, the only information I can get from this button is below

<button xxx="" nbbutton="" type="button" status="primary" class="xxx" aria-disabled="false" tabindex="0">Query</button>

Thank you

Mad_S_Eyes
  • 13
  • 3

1 Answers1

0

The Query button is visual representation of the WebElement rendered through the Browser Client which triggers the data base queries. Where as the actual information of the resources e.g. database, tables can be found only within the server-side code which resides within the Application Server. The Application Server inturn queries the database and those information are kept hidden from the end users.

As an example, invoking click() on the LOGIN sends a post request to the following endpoint which validates the user credentials querying the database:

OrangeHRM

These information is kept hidden from the end users. Else the the database, tables, etc would be easily accessible by the hackers.


Conclusion

As an end user you won't be able to retrieve the database, tables, etc information unless they are exposed in the client-side DOM Tree.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352