Thursday, 10 December 2020

Release 0.4.3 - The End of Something Great

 


Hello my wonderful followers!

It is here... It is finally here. The end of this nightmarish semester is finally here.
I have to say the past two weeks have been really tough for me, with all the final assignments/ labs/ projects.... AND exams bearing and breathing down my neck as the due dates approached.

Needless to say, I got through it. Pulled a couple all nighters and multiple 14/16 hour days worth of work. It feels GOOD though. I found this semester to be the hardest/ most amount of work that needed to be done. Yet, I finished and cannot express how many things I have learned over the course of this semester. 
I have to give my koodos to the very knowledgeable and helpful professor HumphD (OSD600 - Open Source professor). Without him, and this course, I would never have entered the world of open source and have my transition into becoming an open source dev/ contributor go so smoothly. 

Anyways, back to the point. For my last PR of this wonderful course, I chose to do yet another issue for the repo of automating whatsapp web platform. This one was tougher than the last or any previous issues I've done for this repo. 

I think my biggest downfall is finding out how to get python and selenium to collaborate with me without an issue.


So. Let's start by explanation of what I had to do.

I had to open whatsapp. Once connection was established through the bot, I had to cycle through all individual chats and open them.
Once opened the chat info drop down had to be clicked and navigation to delete chat (of the opened already chat) was to be made. Once over the delete element (which is found using a CSS Selector), the element had to be clicked. 



Clicking the "outter" delete would trigger another pop-up box/event to be opened. The bot would have to wait for the presence of the element to be available. Navigates to the element using a CSS Selector and clicks the element.


I ran into problems with the above step because the bot would hang even after the element appeared. I contacted my friend Navpreet (maintainer of the repo) and asked him why this was happening. He quickly glanced at my code when we were on discord with him (late at night because he lives in India) and he explained I was not waiting for the element to become available. So as I mentioned above. The bot would have to wait for the presence of said element "delete" and then execute the follow up functions. He told me it was hanging because it was throwing an uncaught exception and did not know what to do after the exception was thrown. Interesting stuff to be honest. I would have to remember that for next time I contribute to his repo, or other projects :D

After adding that little function in. All I had to do was close the chat info with the function "close_info()". I tested it one final time and made my PR.

I noticed a small problem with the bot behaving strangely on other functionalities that were implemented previously.

I noticed that some of them were not working how they should have been and mentioned it to Navpreet. He said he is aware of this issue and it was happening because of whatsapp changed their CSS Selectors. Thus making pretty much all the main functions break since the selectors did not exist anymore. He thanked me for noticing it as well and said he will make an issue about this when he has time, or fix it himself. 


To be honest, I will probably help him over the winter break since we are buddies now.

Well. Now that I am done with OSD and all my exams. Which by the way could not have ended on the most perfect date than the 9th of December... because CYBERPUNK 2077 came out. AND let me tell you guys. WOW. what an amazing game it has been so far. I have only played about an hour because I was dead tired yesterday, but I was at a loss for words. 8 years in the making was well worth the wait.

Anyways, 

I would like to thank professor Humphrey one last time this semester for giving my colleagues and I the tools and knowledge to gain tremendous amounts of experience this semester and work on whatever we wanted and found enjoyable. 

THANK YOU!


For the last time this semester...

Till next time, 
XOXO,
Gossip Plamen

No comments:

Post a Comment

Release 0.4.3 - The End of Something Great

  Hello my wonderful followers! It is here... It is finally here. The end of this nightmarish semester is finally here. I have to say the pa...