I came across this question & couldn't find a proper explanation anywhere. Can anyone clear this to me?
I'm guessing you mean to ask about Test Automation as opposed to Automation Testing.
If I've got that right, I'd say it actually depends on what you are trying to automate.
If you are only automating the User Interface, for example, a user trying to log in to Gmail via a web browser or a the Gmail mobile app for that matter, then we can consider it a Block-box Testing. Although, if you consider accessing the HTML to get locators as white-box then as Mate Mrše mentions you can consider it as combination of both, Black and White box or as they have a term for it, Hybrid Testing.
If you are trying to automate an API or a database (for example, MySQL queries, stored procedures, etc.), mostly Unit Tests, then they would fall under the White-box Testing category according to me. As this would requires access to the backend and the actual code/database.
I guess it is possible for automation testing to be black-box but it seems unlikely if the automation is done by an in-house team. At least you will need access to HTML code (if we are speaking about web automation) for the locators. And the in-house team can always talk to the devs for details. In many cases, the one automating will be one of the developers.
On the other hand, it could be black-box if an outside team is automating with absolutely no access to the inner details of the code. Again, HTML is always accessible.
So, I guess, web automation is always at least partially white box because you need access to HTML locators.
Unit tests are usually automated and they are by necessity white box.