First I would try:
log_types = driver.log_types();
Then I would try:
logs = driver.get_log(‘server’);
You should be able to request any of the log types returned from the first call.
When requesting the logs you specify which ‘type’ of logs you want.
You can get a list of what type of logs are available with the log_types(); but it is likely you are interested in requesting the ‘server’ type logs if that makes sense? Thus the call driver.get_log(‘server’); would return the logs your appium server you launched programmatically and created a session with.
Thank you for your help.
I educated myself more about python logs And I made some experiments with 3 ways to sart Appium server before to come back to you.
I tried by this way:
appium_service = AppiumService()
appium_service.start()
But I don’t see any log. I guess I need to modify the python file of appium_service method.
So I tried to start appium server with command (I added the flag of scurity you suggested): os.system("start /B start cmd.exe @cmd /k appium --relaxed-security --log-timestamp --log appium.log -a 127.0.0.1 -p 4728")
I could see some logs in terminal but not so much than Appium GUI server.
As you can see Appium GUI logs give more information to debug my code.
What should I do to display same info in Appium terminal than Appium GUI?
What should I do to display same info in ‘appium_service.start()’ than Appium GUI?
Gautier
It looks like you run appium inside your test tool, so just adding those 2 flags should do what you want. What worries me, is that you probably tried that already and did not get joy the first time.