<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Pranav Ajay</title>
    <description>The latest articles on Forem by Pranav Ajay (@cyblogerz).</description>
    <link>https://forem.com/cyblogerz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F600657%2F78057ae7-8fea-4cfc-8e69-fdcccb5eb0a9.jpeg</url>
      <title>Forem: Pranav Ajay</title>
      <link>https://forem.com/cyblogerz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/cyblogerz"/>
    <language>en</language>
    <item>
      <title>Hacktoberfest 2023: My Web Development Odyssey 🚀👨‍💻</title>
      <dc:creator>Pranav Ajay</dc:creator>
      <pubDate>Mon, 25 Sep 2023 08:15:53 +0000</pubDate>
      <link>https://forem.com/cyblogerz/hacktoberfest-2023-my-web-development-odyssey-57kb</link>
      <guid>https://forem.com/cyblogerz/hacktoberfest-2023-my-web-development-odyssey-57kb</guid>
      <description>&lt;p&gt;Hey there, fellow tech enthusiasts! 👋 I'm Pranav, and I'm thrilled to take you on a journey through my Hacktoberfest 2023 adventure. This year, I've got big plans and a boatload of enthusiasm to level up my web development skills. 🌐💪&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Learning and Growing:&lt;/strong&gt; My first goal for Hacktoberfest is to learn more about web development. From HTML and CSS to JavaScript and beyond, I'm diving deep into the world of web technologies. It's a bit like exploring a vast digital universe, and I can't wait to share my discoveries with you! 📚🌍&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Online Resources FTW:&lt;/strong&gt; To make this journey a success, I'll be making the most of online resources. There's a treasure trove of tutorials, courses, and documentation out there, and I plan to gobble it all up. 🤓📖&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open-Source Contributions:&lt;/strong&gt; One of the highlights of this Hacktoberfest will be contributing to relevant open-source repositories. Collaborating with fellow developers, solving real-world problems, and making meaningful contributions to the tech community - count me in! 🤝🌟&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React.js Mastery:&lt;/strong&gt; I've set my sights on excelling in React.js, the beloved JavaScript library. With its growing popularity, becoming a React.js whiz is a goal I'm taking very seriously. Let's build some awesome apps! ⚛️🔥&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coding Challenge Accepted:&lt;/strong&gt; Hacktoberfest isn't just about collecting swag; it's a coding challenge. I'll be setting specific goals, challenging myself daily, and pushing my coding limits. Stay tuned for some serious tech wizardry! 🧙‍♂️💥&lt;/p&gt;

&lt;p&gt;Expect daily blog posts where I spill the beans on my learning experiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;30 Days, 30 Challenges:&lt;/strong&gt; As part of Hacktoberfest 2023, I'm taking on a 30-day challenge. This isn't just about coding; it's about building habits, embracing consistency, and celebrating small victories. Let's do this together! 💪🗓️&lt;/p&gt;

&lt;p&gt;Join me on this thrilling tech journey! 🚀 I can't wait to share my progress, challenges, and triumphs with you. It's going to be an epic Hacktoberfest, and I hope you'll be part of it. Stay tuned for more tech-tastic updates! 🌟😄&lt;/p&gt;

</description>
      <category>hacktoberfest23</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Automating my college's website.</title>
      <dc:creator>Pranav Ajay</dc:creator>
      <pubDate>Sun, 21 Mar 2021 05:04:06 +0000</pubDate>
      <link>https://forem.com/cyblogerz/automating-my-college-s-website-48ho</link>
      <guid>https://forem.com/cyblogerz/automating-my-college-s-website-48ho</guid>
      <description>&lt;p&gt;The most irritating and time consuming thing that I ever came across is our college's website. Every time we needed to login to the site in order to check the attendance or to just quickly check the timetable. So I thought to automate this task with the help of selenium framework in python. &lt;br&gt;
This is how I implemented it:&lt;/p&gt;

&lt;p&gt;1.&lt;strong&gt;Import Libraries:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Note: Before importing we must install selenium by running pip install seleinum in the command line, then download  the chrome webdriver from here: https://chromedriver.chromium.org/downloads&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;2.&lt;strong&gt;Then I initialized the chrome webdriver:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PATH="C:\Program Files (x86)\chromedriver"

driver=webdriver.Chrome(PATH)
driver.get("https://vtop.vitbhopal.ac.in/vtop/")

#This is the site link
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.&lt;strong&gt;Clicking the login button&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With the help of &lt;em&gt;inspect option&lt;/em&gt; in chrome web browser I found out the class of the  button and then specified it in the code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vDLTY0gF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cvupsjokinxxqpdy1umj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vDLTY0gF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cvupsjokinxxqpdy1umj.png" alt="Alt Text" width="800" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As there is no other elements in the home page with the same class there will be no error generated. And we use the click()&lt;br&gt;
method in order to click the button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vtop=driver.find_element_by_class_name("btn-primary")
vtop.click()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.&lt;strong&gt;Typing in the username and password&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we have done in the previous step, we must find the id of the username and the password from the inspect tab and then we must specify it in the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;driver.implicitly_wait(5)
user_input=driver.find_element_by_name("uname")
pass_input=driver.find_element_by_name("passwd")
user_input.send_keys("20BSE10789")#enter your username
pass_input.send_keys("Pranav@2002")#enter your password

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We must ensure that &lt;em&gt;selenium&lt;/em&gt; checks for the elements after the page is fully loaded . So for that we use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;driver.implicitly_wait(5)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that selenium waits for 5 seconds rather than throwing any error.&lt;/p&gt;

&lt;p&gt;5.&lt;strong&gt;Typing in the Captcha&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--InSJYQ5L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3wsdlmxzb49koa8hpbr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--InSJYQ5L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c3wsdlmxzb49koa8hpbr.png" alt="Alt Text" width="652" height="327"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to type in the captcha manually as it is hard to automate captcha. After the captcha is typed  in , the automation will resume. This is achieved by the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bt_submit = driver.find_element_by_id("captcha")
WebDriverWait(driver, timeout=1000, poll_frequency=1) \
  .until(EC.staleness_of(bt_submit))
print("signed in")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code ensures that &lt;em&gt;Selenium&lt;/em&gt; waits for the user to click the sign in button (check every 1s with a 1000s timeout).&lt;/p&gt;

&lt;p&gt;6.&lt;strong&gt;Viewing the attendance and Time Table&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the last part of the code. Here, the time table and attendance tab are located under a drop-down menu ,  I wasn't able to access it directly using the class or ID.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BM9hxCSJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kzaxgfftyke9r91benrj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BM9hxCSJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kzaxgfftyke9r91benrj.png" alt="Alt Text" width="417" height="693"&gt;&lt;/a&gt;&lt;br&gt;
So at first I accessed the main menu element with the help of class mentioned inside the span element:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;driver.implicitly_wait(5)
select=driver.find_element_by_xpath('.//span[@class = "fa fa-graduation-cap"]')
select.click()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that I accessed the submenu item with the find_element_by_link_text() method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;select=driver.find_element_by_link_text('Time Table')#Use Attendance here instead of Time table to view attendance
select.click()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This way we can see the Time Table/Attendance easily.&lt;/p&gt;

</description>
      <category>python</category>
      <category>selenium</category>
      <category>computerscience</category>
      <category>codenewbie</category>
    </item>
  </channel>
</rss>
