<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Oguzhan Sarıtaş on Medium]]></title>
        <description><![CDATA[Stories by Oguzhan Sarıtaş on Medium]]></description>
        <link>https://medium.com/@oguzhannsaritas?source=rss-d0b3d66cee1f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*S90SU-9gj9fEk9vG</url>
            <title>Stories by Oguzhan Sarıtaş on Medium</title>
            <link>https://medium.com/@oguzhannsaritas?source=rss-d0b3d66cee1f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:21:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oguzhannsaritas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Untitled]]></title>
            <link>https://medium.com/@oguzhannsaritas/untitled-a10d7f40a26f?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a10d7f40a26f</guid>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 23:26:56 GMT</pubDate>
            <atom:updated>2026-03-12T23:26:56.432Z</atom:updated>
            <content:encoded><![CDATA[<h3></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a10d7f40a26f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Automate Login Testing with Playwright?]]></title>
            <link>https://medium.com/@oguzhannsaritas/how-to-automate-login-testing-with-playwright-f4ca56bc5af1?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4ca56bc5af1</guid>
            <category><![CDATA[qa-testing]]></category>
            <category><![CDATA[playwrights]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <category><![CDATA[playwright-test]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Fri, 04 Apr 2025 12:42:48 GMT</pubDate>
            <atom:updated>2025-04-04T12:42:48.239Z</atom:updated>
            <content:encoded><![CDATA[<p>Testing web applications is crucial to improve user experience and minimize errors. In this article, we will create a login test scenario using <strong>Playwright</strong> and demonstrate how to track network traffic.</p><h3>What is Playwright?</h3><p><a href="https://playwright.dev/">Playwright</a> is an open-source test automation framework that allows programmatic control over web browsers. It can simulate user interactions and supports multiple browsers such as <strong>Chromium, Firefox, and WebKit</strong>. Thanks to its powerful APIs, it simplifies the testing process significantly.</p><h3>Test Scenario: User Login and Network Tracking</h3><p>In this example, we will automate a login process using Playwright. After entering the username and password, the browser will be closed. Additionally, we will track network requests made during the test execution.</p><p>Here is our code:</p><pre>import { test } from &quot;@playwright/test&quot;;<br>import { LoginPage } from &quot;../../helpers/pages/signIn/signInHelpers&quot;;<br>import NetworkTracking from &quot;../../utilities/network/networkTracking&quot;;<br>import network from &quot;../../utilities/network/network&quot;;</pre><pre>// Creating a new test scenario using &#39;test&#39; function<br>test(&#39;Test sign in&#39;, async ({ page, request }) =&gt; {<br>    // Initializing network tracking<br>    const networkTracking = new NetworkTracking(page);</pre><pre>    // Defining user credentials and API URL<br>    const emailValue = &quot;example@gmail.com&quot;;<br>    const requestUrl = &#39;Your API&#39;; // Replace with your API URL<br>    const collectionName = &#39;user&#39;; // Collection name</pre><pre>    // Creating an instance of LoginPage<br>    const login = new LoginPage(page, request);<br>    <br>    // Navigating to the login page<br>    await login.gotoLoginPage();<br>    console.log(&quot;Navigated to login page.&quot;);<br>    await captureSuccess(page, &#39;gotoLoginPage&#39;);<br>    <br>    // Entering user credentials<br>    await login.gotoEmailandPasswordEntry(emailValue, &quot;12345&quot;);<br>    console.log(&quot;User credentials entered and login performed.&quot;);</pre><pre>    // Closing the browser<br>    await login.closeBrowser();<br>    console.log(&quot;Browser closed.&quot;);</pre><pre>    // Tracking network requests<br>    await network.getHeader(networkTracking, requestUrl, &#39;Accept&#39;);<br>    console.log(`Checked request header: ${requestUrl}`);<br>    await network.getBaseUrl(networkTracking, requestUrl);<br>    console.log(`Tracked base URL: ${requestUrl}`);<br>});</pre><h3>Code Explanation</h3><h3>1. Importing Required Modules</h3><ul><li>@playwright/test: Enables writing test scenarios with Playwright.</li><li>LoginPage: A helper class containing methods for handling login operations.</li><li>NetworkTracking: Helps track network requests during test execution.</li><li>network: A module for handling network-related tasks.</li></ul><h3>2. Initiating the Test Scenario</h3><p>Playwright’s test function is used to create a test scenario named <strong>&#39;Test sign in&#39;</strong>. The function takes <strong>page</strong> and <strong>request</strong> as parameters:</p><ul><li>page: Represents the browser tab controlled by Playwright.</li><li>request: Used to manage network requests.</li></ul><h3>3. Performing the Login Process</h3><ul><li>gotoLoginPage(): Navigates to the login page.</li><li>gotoEmailandPasswordEntry(emailValue, &quot;12345&quot;): Enters user credentials and submits the login form.</li><li>closeBrowser(): Closes the browser after completing the login process.</li></ul><h3>4. Tracking Network Requests</h3><ul><li>getHeader(networkTracking, requestUrl, &#39;Accept&#39;): Checks the headers of HTTP requests made to the specified URL.</li><li>getBaseUrl(networkTracking, requestUrl): Retrieves and tracks the base URL used during testing.</li></ul><h3>Why Should You Use Playwright?</h3><p>✅ <strong>Multi-Browser Support</strong>: Playwright supports popular browsers like Chromium, Firefox, and WebKit. ✅ <strong>Fast and Powerful APIs</strong>: Enables easy simulation of user interactions. ✅ <strong>Network Tracking</strong>: Allows monitoring of HTTP requests, response headers, and redirects. ✅ <strong>Easy Integration</strong>: Works seamlessly with Jest, Mocha, and other test frameworks.</p><h3>Conclusion</h3><p>In this article, we built a login test scenario with Playwright and explained how to track network requests in detail. <strong>Playwright</strong> provides a powerful and flexible tool for test automation, making it a great choice for developers and QA engineers. If you want to automate your test processes, Playwright is definitely worth trying!</p><p>Feel free to share your thoughts and questions in the comments! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4ca56bc5af1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automating User Signup Process with Playwright]]></title>
            <link>https://medium.com/@oguzhannsaritas/automating-user-signup-process-with-playwright-3b9b6d804a69?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/3b9b6d804a69</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[playwright-test]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[qa-testing]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Tue, 25 Feb 2025 07:31:46 GMT</pubDate>
            <atom:updated>2025-02-25T07:34:25.219Z</atom:updated>
            <content:encoded><![CDATA[<p>Testing processes play a critical role in modern web applications. Ensuring that the user signup process works correctly is essential. In this article, we will examine the <a href="https://github.com/oguzhannsaritas/Helpsers-Selectors-Test/blob/main/pages/signup/signupHelpers.js"><strong>signupHelpers.js</strong></a> file, which is used to write automated tests with Playwright.</p><h3>1. Overview of signupHelpers.js File</h3><p>This file defines a class called <a href="https://github.com/oguzhannsaritas/Test-Senairo/blob/main/tests/test-signup-invitation/testSignup%C4%B0nvitation.spec.js">signupInvitation</a> that automates different steps of the signup process.</p><p>This class is derived from the <strong>LoginPage</strong> class and includes necessary selectors, navigation operations, and form-filling processes for the signup flow. Additionally, it utilizes the <a href="https://github.com/oguzhannsaritas/Utilities-Test/blob/main/utilities/utilities.js">utilities.js</a> module, which contains helper functions.</p><h3>2. Helper Methods and Dependencies</h3><p>The <strong>helper functions</strong> used in the code are designed to simulate user actions in UI tests:</p><ul><li><a href="https://github.com/oguzhannsaritas/Utilities-Test/blob/main/utilities/utilities.js">customClick</a>: Clicks on a specified element.</li><li><a href="https://github.com/oguzhannsaritas/Utilities-Test/blob/main/utilities/utilities.js">customFill</a>: Fills an input field.</li><li><a href="https://github.com/oguzhannsaritas/Utilities-Test/blob/main/utilities/utilities.js">waitForLoadState</a>: Waits for the page to reach a specific loading state.</li><li><a href="https://github.com/oguzhannsaritas/Utilities-Test/blob/main/utilities/utilities.js">customHover</a>: Hovers over a specified element.</li><li><a href="https://github.com/oguzhannsaritas/Utilities-Test/blob/main/utilities/utilities.js">customWaitForTimeout</a>: Adds a delay.</li></ul><p>These are highly useful when creating test scenarios with Playwright.</p><h3>3. signupInvitation Class and Its Functions</h3><p>This class contains various methods that manage the key steps of the signup process:</p><h3>3.1. gotoSignupUrl(urlValue)</h3><p>This method handles redirection to the signup page. It retrieves URL values from environment variables (.env file) for different signup options.</p><p><strong>Example Usage:</strong></p><pre>await signup.gotoSignupUrl(&#39;pmax&#39;);</pre><p>This call navigates to the URL defined in the SIGNUP_WITH_PMAX environment variable.</p><h3>3.2. gotoSignup()</h3><p>This method simulates user input for email and password fields and proceeds with the signup process.</p><p><strong>Example Usage:</strong></p><pre>await signup.gotoSignup(&#39;test@example.com&#39;, &#39;securePassword&#39;);</pre><h3>3.3. gotoOnboardingBusinessOverview()</h3><p>This method completes the <strong>business information</strong> step in the signup process by filling in the company type, user role, and website details.</p><p><strong>Example Usage:</strong></p><pre>await signup.gotoOnboardingBusinessOverview(&#39;https://testsite.com&#39;, &#39;E-Commerce&#39;, &#39;CEO&#39;);</pre><h3>3.4. gotoSelectedDatasource()</h3><p>This method simulates the step of connecting a data source, such as integrating Facebook Ads into the platform.</p><h3>3.5. gotoOnboardingIntegration()</h3><p>This method logs into the Facebook account and completes the integration process.</p><p><strong>Example Usage:</strong></p><pre>await signup.gotoOnboardingIntegration(&#39;user@example.com&#39;, &#39;securePassword&#39;);</pre><h3>3.6. gotoOnboardingBookingCalendar()</h3><p>After completing the signup process, this method handles the booking calendar integration and necessary redirections.</p><h3>3.7. closeBrowser()</h3><p>This method closes the browser after the test is completed.</p><h3>4. Selectors and Static Values</h3><p>The code includes two files: <a href="https://github.com/oguzhannsaritas/Helpsers-Selectors-Test/blob/main/pages/signup/selectors/signupSelectors.js">signupSelectors.js</a> and <a href="https://github.com/oguzhannsaritas/Helpsers-Selectors-Test/blob/main/pages/signup/selectors/signupStaticSelectors.js">signupStaticSelectors.js</a>.</p><h3>signupSelectors.js</h3><p>This file contains <strong>dynamic</strong> selectors used in tests. For example:</p><pre>const facebookLoginButton = customByRole(page ,&#39;button&#39;, { name: signupStaticSelectors.facebookLoginButton });</pre><p>Here, the facebookLoginButton variable is used to select the Facebook login button.</p><h3>signupStaticSelectors.js</h3><p>This file stores <strong>static values</strong>:</p><pre>export const signupStaticSelectors = {<br>    webSite: &#39;https://yourwebsite.com&#39;,<br>    createYourAccountButton : &quot;Create your account&quot;,<br>    facebookEmailInput : &#39;Email address or phone number&#39;,<br>    facebookPasswordInput : &#39;Password&#39;,<br>};</pre><p>These variables store fixed values used in tests, reducing the need for repetitive code.</p><h3>5. Conclusion</h3><p>In this guide, we detailed the structure and functionality of the <a href="https://github.com/oguzhannsaritas/Helpsers-Selectors-Test/blob/main/pages/signup/signupHelpers.js"><strong>signupHelpers.js</strong></a> file. You can use and extend this structure when writing automated tests with Playwright.</p><p>If you want to automate a testing process:</p><ul><li><strong>Manage selectors efficiently.</strong></li><li><strong>Use helper functions</strong> (e.g., customClick, customFill) to reduce code repetition.</li><li><strong>Make your code modular</strong> by organizing it into separate files.</li></ul><p>This approach will make your tests more readable, flexible, and maintainable!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3b9b6d804a69" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node.js'de Puppeteer ve Python ile Captcha Çözmeyi Otomatikleştirme]]></title>
            <link>https://medium.com/@oguzhannsaritas/node-jsde-puppeteer-ve-python-ile-captcha-%C3%A7%C3%B6zmeyi-otomatikle%C5%9Ftirme-77f905274877?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/77f905274877</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[qa-testing]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[puppeteer]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 20:17:42 GMT</pubDate>
            <atom:updated>2025-02-23T20:39:09.500Z</atom:updated>
            <content:encoded><![CDATA[<h3>Automating Captcha Solving in Node.js with Puppeteer and Python</h3><p>Captchas are a common security mechanism used to prevent bots from interacting with web services. However, when automating tasks using tools like Puppeteer, solving captchas becomes a challenge. In this article, we will discuss how to <strong>automate captcha solving in a Puppeteer script using Node.js and Python</strong>.</p><h3>1. About the Project</h3><p>This project aims to:</p><ul><li><strong>Extract captcha images from a Puppeteer-controlled page</strong>.</li><li><strong>Use Python OCR to recognize and solve captchas</strong>.</li><li><strong>Automate the captcha submission process in Puppeteer</strong>.</li></ul><h3>2. Technologies Used</h3><ul><li><strong>Node.js</strong>: The main runtime for executing the automation script.</li><li><strong>Puppeteer</strong>: A headless browser automation library.</li><li><strong>Python &amp; Tesseract OCR</strong>: To recognize and extract text from captchas.</li><li><strong>child_process (exec)</strong>: To execute Python scripts from Node.js.</li></ul><h3>3. Node.js Code Explanation</h3><h4>1. Import Required Modules</h4><pre>const { exec } = require(&#39;child_process&#39;);</pre><ul><li>exec from child_process allows us to execute Python scripts from Node.js.</li></ul><h4>2. Extract Captcha Image Source</h4><pre>async function getCaptchaSrc(page) {<br>    const captchaSrc = await page.evaluate(() =&gt; {<br>        const captchaElement = document.querySelector(<br>            &#39;body &gt; div.origin &gt; div.special-feature.special-feature.intro_bg &gt; div &gt; div &gt; form &gt; div &gt; div:nth-child(5) &gt; div.form-group.jvnsMt10 &gt; img&#39;<br>        );<br>        return captchaElement ? captchaElement.src : null;<br>    });<br>    if (!captchaSrc) {<br>        throw new Error(&#39;Captcha image not found.&#39;);<br>    }<br>    return captchaSrc;<br>}</pre><ul><li>Uses Puppeteer’s page.evaluate() function to <strong>extract the captcha image URL</strong>.</li><li>If the image is not found, an error is thrown.</li></ul><h4>3. Solve Captcha Using Python</h4><pre>async function solveCaptcha(captchaSrc) {<br>    return new Promise((resolve, reject) =&gt; {<br>        exec(`python3 /Users/oguzhan/Desktop/bot/example.py &quot;${captchaSrc}&quot;`, (error, stdout, stderr) =&gt; {<br>            if (error) {<br>                reject(`Node.js Error: ${error.message}`);<br>                return;<br>            }<br>            if (stderr) {<br>                reject(`Python stderr: ${stderr}`);<br>                return;<br>            }<br>            resolve(stdout.trim());<br>        });<br>    });<br>}</pre><ul><li>Runs a <strong>Python script to process the captcha</strong>.</li><li>Passes the captchaSrc (either a URL or Base64 image) to the script.</li><li>The Python script applies <strong>OCR (Tesseract)</strong> to extract the captcha text.</li></ul><h4>4. Enter Captcha Solution</h4><pre>async function enterCaptchaSolution(page, captchaResult) {<br>    const inputSelector = &#39;#mailConfirmCodeControl&#39;;<br>    await page.waitForSelector(inputSelector, { timeout: 10000 });<br>    await page.type(inputSelector, captchaResult, { delay: 100 });<br>    console.log(`Captcha result &quot;${captchaResult}&quot; entered.`);<br>}</pre><ul><li>Waits for the <strong>captcha input field</strong> to appear.</li><li>Types the solved captcha into the field with a <strong>delay to mimic human behavior</strong>.</li></ul><h4>5. Combining All Steps in One Function</h4><pre>async function processCaptcha(page) {<br>    try {<br>        const captchaSrc = await getCaptchaSrc(page);<br>        console.log(&#39;Captcha src found:&#39;, captchaSrc);</pre><pre>        const captchaResult = await solveCaptcha(captchaSrc);<br>        console.log(&#39;Captcha solution:&#39;, captchaResult);</pre><pre>        await enterCaptchaSolution(page, captchaResult);<br>        console.log(&#39;Captcha process completed.&#39;);<br>    } catch (error) {<br>        console.error(&#39;Error during captcha processing:&#39;, error);<br>    }<br>}</pre><ul><li>Calls <strong>all three functions</strong> to extract, solve, and enter the captcha.</li><li>Logs relevant steps and handles errors gracefully.</li></ul><h3>4. How This Works</h3><ol><li><strong>Puppeteer navigates to the target page</strong>.</li><li><strong>Extracts the captcha image URL</strong>.</li><li><strong>Sends the image to a Python OCR script</strong>.</li><li><strong>Receives the extracted text from Python</strong>.</li><li><strong>Enters the text into the captcha input field</strong>.</li></ol><h3>5. Conclusion</h3><p>By combining <strong>Node.js, Puppeteer, and Python OCR</strong>, we can automate captcha-solving effectively. How do you handle captchas in your automation projects? Let me know in the comments! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=77f905274877" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced Captcha Solving Using Python and OCR]]></title>
            <link>https://medium.com/@oguzhannsaritas/advanced-captcha-solving-using-python-and-ocr-113a1777a087?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/113a1777a087</guid>
            <category><![CDATA[captcha]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[qa-testing]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 20:09:22 GMT</pubDate>
            <atom:updated>2025-02-23T20:09:22.956Z</atom:updated>
            <content:encoded><![CDATA[<p>Captchas are a common challenge in automation and web scraping. If you frequently encounter captchas while automating processes, you can use <strong>Python and OCR (Optical Character Recognition)</strong> to extract text from captcha images. In this article, we will discuss how to enhance captcha recognition using <strong>image processing techniques</strong>.</p><h3>1. About the Project</h3><p>This project aims to:</p><ul><li><strong>Extract and preprocess captcha images</strong> from various sources (Base64 or direct URL).</li><li><strong>Enhance image clarity</strong> using filters and contrast adjustments.</li><li><strong>Apply OCR (Tesseract) to extract numeric values</strong> from captcha images.</li></ul><h3>2. Technologies Used</h3><ul><li><strong>Python</strong>: The core programming language for image processing.</li><li><strong>PIL (Pillow)</strong>: For image loading and preprocessing.</li><li><strong>pytesseract</strong>: OCR engine for text extraction.</li><li><strong>requests</strong>: To download captcha images from URLs.</li><li><strong>re (regex)</strong>: To filter numeric values from OCR results.</li></ul><h3>3. Python Code Explanation</h3><h4>1. Import Required Libraries</h4><pre>import pytesseract<br>from PIL import Image, ImageEnhance, ImageFilter<br>import requests<br>import sys<br>import re<br>from io import BytesIO<br>import base6</pre><ul><li>pytesseract: Performs OCR to extract text from images.</li><li>PIL (Pillow): Handles image processing, filtering, and enhancement.</li><li>requests: Allows downloading captcha images from URLs.</li><li>sys: Handles command-line arguments.</li><li>re: Helps filter out only numeric characters.</li><li>BytesIO and base64: Handle base64-encoded images.</li></ul><h4>2. Handle Command-line Arguments</h4><pre>if len(sys.argv) &lt; 2:<br>    print(&quot;No captcha URL or Base64 data provided!&quot;)<br>    sys.exit(1)<br><br>captcha_src = sys.argv[1]  # Captcha source URL or Base64 string</pre><ul><li>The script expects <strong>one argument</strong>: the captcha source (a URL or Base64 string).</li><li>If no argument is provided, the script exits with an error message.</li></ul><h4>3. Download or Decode the Captcha Image</h4><pre>try:<br>    if captcha_src.startswith(&quot;data:image&quot;):<br>        base64_data = captcha_src.split(&quot;,&quot;)[1]  # Extract base64 data<br>        image_bytes = base64.b64decode(base64_data)  # Decode base64<br>    else:<br>        response = requests.get(captcha_src)<br>        if response.status_code == 200:<br>            image_bytes = response.content<br>        else:<br>            print(f&quot;Failed to download captcha. HTTP Status: {response.status_code}&quot;)<br>            sys.exit(1)</pre><ul><li>If the input is <strong>Base64 encoded</strong>, it is extracted and decoded.</li><li>Otherwise, the script <strong>downloads the image</strong> from the provided URL.</li><li>If the URL returns an error, the script exits.</li></ul><h4>4. Preprocess the Captcha Image</h4><pre> image = Image.open(BytesIO(image_bytes))<br>    image = image.convert(&#39;L&#39;)  # Convert to grayscale<br>    image = ImageEnhance.Contrast(image).enhance(2)  # Increase contrast<br>    image = image.filter(ImageFilter.MedianFilter())  # Reduce noise</pre><ul><li><strong>Grayscale conversion (</strong><strong>convert(&#39;L&#39;))</strong>: Reduces color complexity.</li><li><strong>Contrast enhancement (</strong><strong>enhance(2))</strong>: Makes text more distinguishable.</li><li><strong>Noise reduction (</strong><strong>MedianFilter())</strong>: Helps remove background noise.</li></ul><h4>5. Extract Text Using OCR</h4><pre>    text = pytesseract.image_to_string(image)</pre><ul><li>pytesseract.image_to_string(image): Extracts text from the processed image.</li></ul><h4>6. Extract Numeric Captcha Codes</h4><pre> numbers = re.findall(r&#39;\d+&#39;, text)  # Extract only numbers<br>    if numbers:<br>        print(&quot; &quot;.join(numbers))<br>    else:<br>        print(&quot;No numbers found.&quot;)</pre><ul><li>Uses <strong>regex (</strong><strong>\d+)</strong> to extract only numbers.</li><li>If numbers are found, they are printed; otherwise, an error message is shown.</li></ul><h4>7. Handle Exceptions</h4><pre>except Exception as e:<br>    print(f&quot;Error: {e}&quot;)<br>    sys.exit(1)</pre><ul><li>Any unexpected errors are caught and printed to avoid script crashes.</li></ul><h3>4. How This Works</h3><p>This script can be used in automation workflows where captchas appear frequently. By preprocessing the image and applying OCR, we significantly <strong>increase the accuracy</strong> of captcha recognition.</p><h3>5. Conclusion</h3><p>With Python, <strong>image processing techniques</strong>, and <strong>OCR</strong>, captchas can be solved programmatically. Have you used similar approaches in your automation projects? Let me know your thoughts in the comments! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113a1777a087" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatically Solving Captcha Codes Received via Email]]></title>
            <link>https://medium.com/@oguzhannsaritas/automatically-solving-captcha-codes-received-via-email-4aa5c81a107e?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/4aa5c81a107e</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[qa-testing]]></category>
            <category><![CDATA[captcha]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 20:03:08 GMT</pubDate>
            <atom:updated>2025-02-23T20:10:41.300Z</atom:updated>
            <content:encoded><![CDATA[<p>Captcha solutions are a common challenge in automation projects. If a service sends captchas via email and you don’t want to enter them manually, there’s a way to automate this process! In this article, I’ll show you how to <strong>process email attachments and solve captchas using Node.js and Python</strong>.</p><h3>1. About the Project</h3><p>In this project, we use <strong>Gmail IMAP</strong> to check for unread emails. If an email contains a captcha image attachment, we convert it to <strong>base64 format</strong> and solve it using a Python script.</p><h3>2. Technologies Used</h3><ul><li><strong>Node.js</strong>: To establish an IMAP connection and process emails.</li><li><strong>imap-simple</strong>: A library to simplify IMAP email operations.</li><li><strong>mailparser</strong>: To parse email contents.</li><li><strong>Python</strong>: For solving the captcha.</li><li><strong>child_process</strong>: To execute the Python script from Node.js.</li></ul><h3>3. Code Explanation</h3><p>Below, we explain the contents of <strong>emailCaptcha.js</strong> step by step.</p><h4>1. IMAP Connection Settings</h4><p>To connect to our Gmail account using the IMAP protocol, we configure the following settings:</p><pre>const config = {<br>    imap: {<br>        user: &#39;Your Mail&#39;,<br>        password: &#39;Your token&#39;,<br>        host: &#39;imap.gmail.com&#39;,<br>        port: 993,<br>        tls: true,<br>        authTimeout: 3000,<br>        tlsOptions: { servername: &#39;imap.gmail.com&#39; }<br>    }<br>};</pre><p>This configuration allows us to connect to the Gmail IMAP server. Authentication is done using the username and password. The tls: true setting enforces a secure connection.</p><h4>2. Captcha Solving Function</h4><p>This function retrieves a captcha image and sends it to the Python script for solving:</p><pre>function solveCaptchaWithPython(base64Data) {<br>    return new Promise((resolve, reject) =&gt; {<br>        const command = `python3 /Users/oguzhan/Desktop/bot/example.py &quot;data:image/png;base64,${base64Data}&quot;`;<br>        exec(command, { maxBuffer: 1024 * 1024 }, (error, stdout, stderr) =&gt; {<br>            if (error) {<br>                return reject(`Node.js Error: ${error.message}`);<br>            }<br>            if (stderr) {<br>                return reject(`Python stderr: ${stderr}`);<br>            }<br>            resolve(stdout.trim());<br>        });<br>    });<br>}</pre><p>The purpose of this function is to <strong>decode and solve the captcha image using OCR (Optical Character Recognition)</strong>.</p><ul><li>The exec function runs the <strong>Python script</strong>.</li><li>The base64-formatted captcha image is <strong>sent to the Python script</strong>.</li><li>Python analyzes the image with OCR and returns the result.</li></ul><h4>3. Reading Emails and So</h4><h4>lving Captcha</h4><p>This function searches for unread emails, extracts the captcha attachment, and solves it:</p><pre>async function getEmailCaptchaCode() {<br>    let code = null;<br>    let connection;<br><br>    try {<br>        console.log(&#39;Establishing IMAP connection...&#39;);<br>        connection = await imap.connect(config);<br>        console.log(&#39;IMAP connection successful.&#39;);<br><br>        console.log(&#39;Opening INBOX...&#39;);<br>        await connection.openBox(&#39;INBOX&#39;);<br>        console.log(&#39;INBOX opened.&#39;);<br><br>        const searchCriteria = [&#39;UNSEEN&#39;];<br>        const fetchOptions = { bodies: [&#39;&#39;], markSeen: false };<br>        const messages = await connection.search(searchCriteria, fetchOptions);<br><br>        if (messages.length === 0) {<br>            console.log(&#39;No unread emails found.&#39;);<br>            return null;<br>        }<br><br>        const sortedMessages = messages.sort((a, b) =&gt; new Date(b.attributes.date) - new Date(a.attributes.date));<br>        const newestMessage = sortedMessages[0];<br>        const allBody = newestMessage.parts[0].body;<br>        const parsed = await simpleParser(allBody);<br><br>        if (parsed.attachments &amp;&amp; parsed.attachments.length &gt; 0) {<br>            for (const attachment of parsed.attachments) {<br>                const base64Data = attachment.content.toString(&#39;base64&#39;);<br>                const captchaResult = await solveCaptchaWithPython(base64Data);<br>                if (captchaResult) {<br>                    code = captchaResult;<br>                    break;<br>                }<br>            }<br>        }<br>    } catch (err) {<br>        console.error(&#39;Error reading email or solving captcha:&#39;, err);<br>    } finally {<br>        if (connection) {<br>            await connection.end();<br>            console.log(&#39;IMAP connection closed.&#39;);<br>        }<br>    }<br><br>    return code;<br>}</pre><p>This function:</p><ul><li><strong>Connects to the IMAP server and retrieves unread emails</strong>.</li><li><strong>Selects the most recent unread email</strong>.</li><li><strong>Checks for captcha image attachments, converts them to base64, and processes them</strong>.</li><li><strong>Sends the captcha to the Python script for solving and returns the result</strong>.</li></ul><p>You can browse Python Captcha Solving Script from this <a href="https://medium.com/@oguzhannsaritas/advanced-captcha-solving-using-python-and-ocr-113a1777a087">url</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aa5c81a107e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[16 Important UX Design Principles]]></title>
            <link>https://medium.com/@oguzhannsaritas/16-important-ux-design-principles-015ddccc7a9d?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/015ddccc7a9d</guid>
            <category><![CDATA[ux-writing]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[ux-research]]></category>
            <category><![CDATA[ux-design]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Thu, 11 Apr 2024 14:07:24 GMT</pubDate>
            <atom:updated>2024-04-11T14:07:24.515Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>1 — Meet User Needs</strong></blockquote><ul><li>The foremost principle is to focus on the user throughout the design process. Developing a <strong>customer experience</strong> using your products and services should be your main goal in your work.</li><li>Therefore, you need to understand what users are looking for in a design (through user testing and other methods). As a developer, your design may look brilliant to you, but you should not be under the illusion that the user will think the same way.</li></ul><blockquote><strong>2 — Know Where You Are in the Design Process</strong></blockquote><ul><li>For new UX designers, the design process can be overwhelming. It is important not to get lost in too much design work and to know your place in the design process.</li><li>Knowing the design phase also helps you ask the right questions for user research. For example, there is no point in testing the color of a button if you don’t know where you think it should be placed in the design.</li></ul><blockquote><strong>3. Have a Clear Hierarchy</strong></blockquote><ul><li>It is easy to accept the hierarchy provided to you for the design, but it is important to develop a clear hierarchy to be able to create a correct UX experience throughout the design.</li><li>For example, when you open a website or app, the main menu at the top presents the hierarchy of the website. As you scroll through the main menu, you will notice that there are also sub-menu headings for you to see within the site, which are secondary menus. An example can be given as above.</li></ul><blockquote><strong>4. Be Consistent</strong></blockquote><ul><li>Users expect products to bear some similarities with other products they use regularly. This makes it easier for them to recognize the new product without any additional learning costs. It may sound a bit counterintuitive, but the more familiar your design is to others, the faster users can learn to use it, which improves their experience.</li><li>Such consistency makes the design process easier for designers because they don’t have to reinvent the wheel with each new project.</li></ul><blockquote><strong>5 — Understand Accessibility</strong></blockquote><ul><li>If a design work is to be done, it must be done with accessibility in mind. In simple terms, a designer’s responsibility is to ensure that their design is usable by as many people as possible.</li><li>For example, you can use contrasting colors for the text in the background. The blog of the <strong>Slack</strong> app is a perfect example of this.</li></ul><blockquote><strong>6 — Context is Key</strong></blockquote><ul><li>When designing, you need to consider the context of the user. The time available to the user, the location, their emotional state, the device they are using, the people who influence them and more.</li><li>All these factors help you understand the user’s behavior. Once you understand these factors, you can create a design that maximizes the user experience.</li></ul><blockquote><strong>7 — Usability Prioritized</strong></blockquote><ul><li>UX design is entirely focused on solving users’ problems, which makes design usability one of the most important user experience design principles. No matter how aesthetically pleasing your work is, it won’t be of value to the user unless it is safe and easy to use.</li><li>An example here is website design. Any site that is complex is bound to lose visitors. Your job as a designer is to make sure that every icon, button and snippet in the design has a purpose.</li><li><strong>Usability</strong> is the reason why important buttons and a minimalist design with few elements can increase the click-through rate (CTR). By changing the color and size of a button, you can double the click-through rate.</li><li><strong>Usability</strong> testing asks users to interact with the design. In the meantime, you can test if they encounter any problems.</li><li>If many people encounter similar problems, you will need to make changes to the design to solve the usability issue. Remember that design is an iterative process and requires improvements at all stages.</li></ul><blockquote><strong>8 — Be Less is More</strong></blockquote><ul><li>It is a principle that advocates discarding everything decorative when creating a design and focusing on giving the most substance with the least. It emphasizes simplicity over excess.</li><li>Many famous designs have emerged as a result of this UX design principle, including the iPhone and iPod. Apple’s website follows the same design principle.</li></ul><blockquote><strong>9 — Use Simple Language</strong></blockquote><ul><li>When simplicity becomes a best practice in visual design, UX-oriented copywriting should avoid technical terms and choose simple language. Users are busy, they are on the go, they are multitasking, so use words in your design that are closest to the user’s thoughts.</li><li>Simple language is easy to understand, which makes your design user-friendly.</li><li>When choosing simple words for your design, you need to take five points into account.</li></ul><p><strong>Audience and purpose of the design </strong>: Ask who your audience is, what information they have, what they need and what they want to achieve with your communication<br>- <strong>Structure</strong> : Common structures for your communication, ask which structures your readers are familiar with and which sequence would be easy to read<br>- <strong>Design layout</strong> : Focus on typography, layout and information graphics<br>- Think about the tone, verbs, sentence length, jargon and word choice that your communication will adopt<br>- <strong>Evaluation</strong> : Review the finalized text and ask for a usability test</p><blockquote><strong>10 — The Power of Typography</strong></blockquote><ul><li>Typographic choices can significantly influence the way users interpret the language you use, helping to enhance or suppress the message. Moreover, typography can enhance UX in a variety of ways.</li><li>For example, when you consider a typographic hierarchy, it can improve accessibility and make the design more user-friendly. Take a page from the design of online publishing platform Medium. Medium uses specific typography to make its content more readable.</li></ul><blockquote><strong>11 — Feedback Matters</strong></blockquote><ul><li>Design should be interactive in nature. So when a user clicks on something, they need to get a response from the product to understand that their command has been received. Feedback is a crucial way to encourage communication between humans and machines.</li><li>Your design can respond in various ways. The clicked icon can change shape, vibrate, change color, emit light, etc. You can see how the color reacts when you click a link on the <strong>Zapier </strong>website.</li></ul><blockquote><strong>12 — Move Forward with Confirmation</strong></blockquote><ul><li>Accidents happen all the time. A common digital example: a person may place an order unintentionally. However, your design should help fix this, because you don’t want to give the user a bad experience. This makes validation one of the core UX design principles.</li><li>Apple asking for confirmation when you empty the trash is an important way to use this principle.</li></ul><blockquote><strong>13 — User must be kept in Control</strong></blockquote><ul><li>User control focuses on greater flexibility of use and better control of where the user is within the design or product, improving the user experience. It also allows users to step back and recover from mistakes.</li><li>A good example is the “<strong>up</strong>” icon on a web page, which allows you to go to the top of the page. Similarly, a “<strong>cancel</strong>” button that allows users to abandon a task empowers them. Likewise, an example would be an “<strong>undo</strong>” button that prevents the user from taking an unwanted action.</li></ul><blockquote><strong>14. Personalize Your Design</strong></blockquote><ul><li>Your design can attract more users if it shows a character that is relevant to the person you are designing for. Users find it hard to connect with a lifeless design, device or code.</li><li>Adding personality to your design gives it that human touch that makes it more attractive and useful. <strong>Trello Blog</strong> is an example of this.</li></ul><blockquote><strong>15 — Visual Grammar</strong></blockquote><ul><li>Visual grammar has its roots in graphic design, but it is at the beginning of all visual communication, playing an important role in the user experience.</li><li>Visual grammar consists of everything that makes up the visual elements of a design ;</li></ul><p><strong>- Icons</strong></p><p><strong>- Illustrations</strong></p><p><strong>- Patterns and more.</strong></p><blockquote><strong>16 — Narrative Design</strong></blockquote><ul><li>Another of the most important user experience design principles is narrative design, or telling a story with your design.</li><li>Two important storytelling elements are time and rhythm.</li></ul><blockquote><strong>Conclusion ;</strong></blockquote><ul><li>As you pursue a career path in UX design, you want to familiarize yourself with common UX terms and UX design fundamentals. Aligning your work with these UX design principles will increase your output and set you up for success as a UX designer.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=015ddccc7a9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are UI and UX Design and principles.]]></title>
            <link>https://medium.com/@oguzhannsaritas/what-are-ui-and-ux-design-and-principles-913e806218a2?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/913e806218a2</guid>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[ui-ux]]></category>
            <category><![CDATA[ui-design]]></category>
            <category><![CDATA[ui-ux-design]]></category>
            <category><![CDATA[ux-design]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Thu, 11 Apr 2024 13:49:36 GMT</pubDate>
            <atom:updated>2024-04-11T13:49:36.463Z</atom:updated>
            <content:encoded><![CDATA[<p>UI/UX Design are important disciplines developed to ensure that digital products are used effectively by users and provide a positive experience. A guide that provides information on Usability and Interactivity, which stand out among the basic principles of UI (User Interface) / UX (User Experience) design;</p><p><strong>1. What is Usability and Why is it Important?<br></strong> <strong>2. The Role and Importance of Interaction Design<br> 3. Minimalism and the Principle of Simplicity<br> 4. Brief and Meaningful Feedback<br> 5. Avoid Inconsistencies<br> 6. User Testing and Feedback</strong></p><blockquote><strong>1.What is Usability and Why is it Important ?</strong></blockquote><p>Usability refers to how effectively and efficiently a user can use a product. A website, application or other digital tool should provide users with convenience and enable them to quickly access the information or services they want. Improving usability positively impacts user satisfaction and product success.</p><blockquote><strong>2. The Role and Importance of Interaction Design</strong></blockquote><p>Interaction design is concerned with designing the processes by which users interact with a product. To improve the user experience, interactions between buttons, menus, forms and other elements within a page or application should be carefully planned. Good interaction design helps users to interact with the product comfortably.</p><blockquote><strong>3. Minimalism and the Principle of Simplicity</strong></blockquote><p>Minimalism is an important principle in [UI/UX design]Unnecessary complexity should be avoided on screens and only the necessary information should be presented to the user. Simple and clean designs keep users focused and help them understand the product more easily.</p><blockquote><strong>4. Short and Meaningful Feedback</strong></blockquote><p>Users want to know that their actions are recognized by the system. Therefore, it is important to provide fast, meaningful and user-friendly feedback to any user interaction. Informing the user when the action is complete or when an error occurs enhances the user experience.</p><blockquote><strong>5. Avoid inconsistencies</strong></blockquote><p>Consistency in UI design refers to the use of the same design language as the user navigates through a page or application. Consistency of menus, colors, typography and other design elements helps the user to better understand and use the product.</p><blockquote><strong>6. User Testing and Feedback Gathering</strong></blockquote><p>It is very important to organize user tests and get feedback to improve your UI/UX design. Observing how users interact with your product in real use cases will help you optimize your design and increase user satisfaction.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=913e806218a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[QA Apı Testing Tools]]></title>
            <link>https://medium.com/@oguzhannsaritas/qa-ap%C4%B1-testing-tools-9cf1285c32b5?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9cf1285c32b5</guid>
            <category><![CDATA[api-test]]></category>
            <category><![CDATA[api-testing-tools]]></category>
            <category><![CDATA[api-test-automation]]></category>
            <category><![CDATA[api-development]]></category>
            <category><![CDATA[api-testing]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Mon, 11 Dec 2023 22:33:11 GMT</pubDate>
            <atom:updated>2023-12-11T22:33:11.833Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pODomVF-Jp268JHww1O2HA.png" /></figure><blockquote><strong><em>Hello friends . Today I will tell you about API Testing Tools.</em></strong></blockquote><h3>DataDog</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tmp7nGBLHCLjlhX1" /></figure><ul><li><strong><em>Continuously monitors the performance of APIs and offers API tests to make sure they are always up and running.</em></strong></li><li><strong><em>It allows to quickly detect any changes in the system and solve problems at an early stage.</em></strong></li><li><strong><em>API testing is one of the features Datadog offers.</em></strong></li><li><strong><em>It can be used to check API results, validate data formats and monitor API responses.</em></strong></li><li><strong><em>API allows us to monitor response times. We can observe the performance of the application in real time and set alerts for response times that exceed a certain threshold.</em></strong></li><li><strong><em>It has the ability to send alerts based on predefined criteria. This alerts if the API’s response time exceeds a certain average.</em></strong></li><li><strong><em>It has a large ecosystem that can integrate with popular tools and services.</em></strong></li></ul><blockquote>It has a wide range of tools that can meet our needs, such as checking API results, validating data formats, monitoring response times and sending alarms when exceeding average times.</blockquote><h3>RunScope</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*Ku67loTIywAz6JhY.png" /></figure><ul><li><strong><em>Allows you to continuously test your APIs.</em></strong></li><li><strong><em>Automatically checks APIs at regular intervals and verifies that they are working as expected.</em></strong></li><li><strong><em>Checks that API requests return the correct responses, use the correct data formats and meet performance standards.</em></strong></li><li><strong><em>It allows us to run API tests from various locations around the world.</em></strong></li><li><strong><em>If the API test fails or exceeds a certain performance threshold, Runscope can alert us in real time.</em></strong></li><li><strong><em>It provides detailed reports and logs of the tests.</em></strong></li></ul><blockquote><em>A powerful tool for continuously testing APIs, monitoring performance and identifying and resolving issues early.</em></blockquote><h3>Assertible</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3HhxTKktrhP9Bt_5.png" /></figure><ul><li>It allows us to test APIs on an ongoing basis.</li><li>It can check that API requests return the correct responses, use the correct data formats and meet performance standards.</li><li>It can alert in real time. This allows us to respond to problems quickly.</li><li>It can be integrated, for example with Slack, GitHub and Jenkins.</li><li>Provides detailed reports and analysis of test results.</li></ul><h3>Checkly</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*79kuoKM8huC5aRjv" /></figure><ul><li>It is a continuous testing and monitoring tool designed for APIs.</li><li>It allows you to continuously test both APIs and web applications.</li><li>It verifies whether APIs and web pages work properly, provide expected responses and meet performance standards.</li><li>Checkly supports JavaScript-based test cases. This allows us to integrate with modern automation frameworks such as Puppeteer and Playwright.</li><li>It sends real-time alerts based on the results of the tests.</li><li>Provides detailed reports and logs of test results.</li><li>It can integrate with popular tools such as GitHub, GitLab, Slack, PagerDuty.</li><li>It can perform API tests from various locations around the world.</li></ul><h3>Postman</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LF3WRc-jibhBaRaT" /></figure><ul><li>It allows us to make various API requests (GET, POST, PUT, DELETE, etc.) and test the responses of these requests.</li><li>It allows us to create and run automated API test cases.</li><li>We can organize your API requests into collections and share these collections with other team members. We can also automatically generate documentation for your APIs.</li><li>It allows us to create mock services to test your APIs before they are fully developed.</li></ul><blockquote>These tools that I have shown will fit our needs and are more affordable than the others I have researched. Other tools start at a price like 200$ per month and they are very expensive. In line with price performance and our wishes, these tools will do our job.</blockquote><p><strong><em>I’m stuck between 2 tools; Checkly ande Postman.</em></strong></p><blockquote><strong>Continuous API Testing</strong></blockquote><ul><li><strong>Checkly</strong>: Strong at continuous testing.</li><li><strong>Postman</strong>: Can create automated test cases, but not as advanced as Checkly in continuous testing and monitoring.</li></ul><blockquote><strong>Checking API Results:</strong></blockquote><ul><li><strong>Checkly</strong>: Can check API responses and returned data structures.</li><li><strong>Postman</strong>: Can check API responses and create test cases.</li></ul><blockquote><strong>Checking Data Formats:</strong></blockquote><ul><li><strong>Checkly</strong>: Offers checking and validating data formats.</li><li><strong>Postman</strong>: Offers a wide range of options for checking data formats and structures.</li></ul><blockquote><strong>Check Response Time and Send Alarms:</strong></blockquote><ul><li><strong>Checkly</strong>: Can monitor response times and send alerts if they exceed set thresholds.</li><li><strong>Postman</strong>: Not as powerful as Checkly when it comes to sending alerts.</li></ul><blockquote><strong>As a result, if continuous testing, performance monitoring and real-time alerts are your most important needs, I think Checkly will be a more appropriate choice and the price is more affordable than other tools.</strong></blockquote><h4>But ;</h4><blockquote><strong>If API development and creating detailed test scenarios are more important, Postman may be preferred.</strong></blockquote><p>I told you about the tools you can use related to API tests for you. I hope 1 of them will definitely be useful for you. <br> See you again :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cf1285c32b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Composable and Mixins …]]></title>
            <link>https://medium.com/@oguzhannsaritas/composable-and-mixins-f0166332de48?source=rss-d0b3d66cee1f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0166332de48</guid>
            <category><![CDATA[composables]]></category>
            <category><![CDATA[vue]]></category>
            <category><![CDATA[vue-composable]]></category>
            <category><![CDATA[vue-mixins]]></category>
            <category><![CDATA[composbales-and-mixins]]></category>
            <dc:creator><![CDATA[Oguzhan Sarıtaş]]></dc:creator>
            <pubDate>Tue, 28 Nov 2023 23:17:14 GMT</pubDate>
            <atom:updated>2023-11-28T23:17:14.391Z</atom:updated>
            <content:encoded><![CDATA[<h3>Composable and Mixins …</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bMhdZToA4yf9ilYZ" /></figure><h3>COMPOSABLES</h3><blockquote>WHAT DOES IT DO ? ;</blockquote><ul><li>Composables are modular functions introduced with Vue.js 3 that allow you to group reusable logic and use it in various places in your application.</li><li>They are mainly used for state management and reactive data flow. Within a composable you can define data, computed properties and methods.</li></ul><blockquote>HOW DOES IT WORK ? ;</blockquote><ul><li>Using Vue’s Composition API, you can extract complex logic from inside a component in a way that makes that logic reusable, testable and readable.</li><li>A composable can be used to manage the logic of a shopping cart. Functions such as adding and removing items to the cart, calculating the total price are defined in the composable and can be used in different components.</li></ul><blockquote>ADVANTAGES ;</blockquote><ul><li>It makes your code more modular and organized.</li><li>It allows you to easily share and test logic between components.</li></ul><h3>MİXİNS</h3><blockquote>WHAT DOES IT DO ? ;</blockquote><ul><li>Mixins are used to add additional functionality to Vue components. They allow you to share component properties such as data, methods, calculated properties and lifecycle hooks.</li></ul><blockquote>HOW DOES IT WORK ? ;</blockquote><ul><li>A mixin adds properties to a Vue component. This is similar to the process of adding a property with the Options API.</li><li>A form validation mixin can contain common validation rules and methods to be used across different forms.</li></ul><blockquote>DISADVANTAGES ;</blockquote><ul><li>Mixins can lead to complexity and name conflicts, especially in large projects. Also, it can be difficult to understand which component is using mixins.</li></ul><h3>THE DIFFERENCE BETWEEN COMPOSABLES AND MIXINS</h3><ul><li>Composables offer a more modern approach as modular functions and are compatible with the Composition API. Mixins extend the features using the Options API.</li><li>Composables make your code cleaner and more understandable, whereas mixins can lead to complexity.</li><li>Composables allow you to use Vue 3’s reactive system more efficiently, while mixins remain limited to legacy approaches.</li></ul><blockquote>A SIMPLE EXAMPLE ;</blockquote><ul><li>Imagine you have a recipe book (your Vue.js application). Composables, like every recipe in this book, are reusable recipe cards containing specific ingredients (data) and preparation steps (methods). You can use each card in different dishes (ingredients).</li><li>Mixins, on the other hand, can be thought of as adding a certain sauce (properties) each time you cook. This sauce can be applied to each dish (ingredient), but sometimes it can be difficult to keep track of which sauce is in which dish.</li></ul><h4>An example of using composables in Vue.js ;</h4><ul><li>As a simple composable example, let’s create a composable that manages the state and functions of a counter. This composable will hold the value of the counter and contain functions that increment and decrement the counter.</li></ul><h4>Counter Composable Example (useCounter.js)</h4><pre>// useCounter.js<br>import { ref } from &#39;vue&#39;;<br><br>export function useCounter() {<br>  const count = ref(0);<br><br>  function increment() {<br>    count.value++;<br>  }<br><br>  function decrement() {<br>    count.value--;<br>  }<br><br>  return { count, increment, decrement };<br>}</pre><ul><li>In this composable, ref is used from Vue’s Composition API. We create a reactive reference called count. increment and decrement functions increment and decrement this counter. These functions and the variable count are returned to any component that uses composable.</li></ul><h4>Using Composable in a Component</h4><ul><li>Now we can use our useCounter composable in any Vue component.</li></ul><blockquote>For example ;</blockquote><pre>&lt;template&gt;<br>  &lt;div&gt;<br>    &lt;p&gt;Count: {{ count }}&lt;/p&gt;<br>    &lt;button @click=&quot;increment&quot;&gt;Increment&lt;/button&gt;<br>    &lt;button @click=&quot;decrement&quot;&gt;Decrement&lt;/button&gt;<br>  &lt;/div&gt;<br>&lt;/template&gt;<br><br>&lt;script&gt;<br>import { useCounter } from &#39;./useCounter&#39;;<br><br>export default {<br>  setup() {<br>    const { count, increment, decrement } = useCounter();<br><br>    return { count, increment, decrement };<br>  }<br>};<br>&lt;/script&gt;</pre><ul><li>In this component, we call the useCounter composable in the setup function and get the count, increment, decrement values. Thus, we can use the state and functions of the counter in this component.</li></ul><blockquote>WHY USE IT ?</blockquote><ul><li>Composables, Vue uygulamalarınızda tekrar kullanılabilir mantığı organize etmenin ve yönetmenin bir yoludur. Bu örnek, bir sayacın durumunu ve işlevlerini yönetmek için composable kullanımının basit bir örneğidir. Benzer şekilde, daha karmaşık durumlar ve işlevler için de composable’lar kullanılabilir, bu sayede kodun okunabilirliği ve yeniden kullanılabilirliği artar.</li></ul><h3>Example of using mixins in Vue.js</h3><ul><li>We can create a mixin that performs a simple user tracking functionality. This mixin will track the login status of users and provide some additional information if the user is logged in.</li></ul><h4>User Tracking Mixin Example (userMixin.js)</h4><pre>// userMixin.js<br>export default {<br>  data() {<br>    return {<br>      isUserLoggedIn: false,<br>      userName: &#39;&#39;,<br>    };<br>  },<br>  methods: {<br>    login(user) {<br>      this.isUserLoggedIn = true;<br>      this.userName = user;<br>    },<br>    logout() {<br>      this.isUserLoggedIn = false;<br>      this.userName = &#39;&#39;;<br>    },<br>  },<br>};</pre><ul><li>In this mixin, the data function defines the reactive data, which includes the user login status and username, while the login and logout methods manage this state.</li></ul><h4>Using Mixin in a Component</h4><ul><li>We can use the userMixin we created in any Vue component.</li></ul><blockquote>Example:</blockquote><pre>&lt;template&gt;<br>  &lt;div&gt;<br>    &lt;p v-if=&quot;isUserLoggedIn&quot;&gt;Welcome, {{ userName }}!&lt;/p&gt;<br>    &lt;button v-if=&quot;!isUserLoggedIn&quot; @click=&quot;login(&#39;user&#39;)&quot;&gt;Log in&lt;/button&gt;<br>    &lt;button v-if=&quot;isUserLoggedIn&quot; @click=&quot;logout&quot;&gt; log out&lt;/button&gt;<br>  &lt;/div&gt;<br>&lt;/template&gt;<br><br>&lt;script&gt;<br>import userMixin from &#39;./userMixin&#39;;<br><br>export default {<br>  mixins: [userMixin],<br>};<br>&lt;/script&gt;</pre><ul><li>In this component, userMixin is included in the component using the mixins property. The data and methods defined in the mixin can now be used directly in the component. When the user logs in, the isUserLoggedIn and userName variables are updated and this information is shown in the interface.</li></ul><blockquote>WHY USE IT ?</blockquote><ul><li>Mixins are a way to share reusable pieces of code in Vue applications. However, in large and complex applications, problems can arise, such as conflicting data and methods within different mixins. When using mixins, it is important to monitor and manage which mixin is used in which component. This is an example of using a mixin to manage a simple user input-output functionality, and similarly, it can be used for different functions and data management.</li></ul><h4>A few important reasons not to use Mixins in Vue.js</h4><ul><li>Mixins can cause conflicts between property and method names when more than one mixin is used. This makes it difficult to understand which properties or methods come from which mixin.</li><li>Data and methods within mixins, when combined directly with components, can make those components complex and difficult to understand. This problem becomes even more pronounced in large and complex applications.</li><li>Mixins are less flexible and modular compared to composables, although they provide reusable pieces of code in certain situations.</li><li>Mixins are closer to Vue’s old Options API. The innovations and improvements brought by Vue 3 and the Composition API encourage the use of composables instead of mixins.</li></ul><h4>A few important reasons why Composables is preferred in Vue.js</h4><ul><li>Composables allow you to make your code in a more modular and organized way. Each composable covers a specific piece of functionality or logic, making your code more understandable and manageable.</li><li>Composables allows you to define functionality and state management independently of components, which makes code reusability and maintenance easier.</li><li>Since Composables are designed as reusable and independent functions, they can be easily used in different components and contexts.</li><li>Composables works in harmony with other features of Vue 3 and the ecosystem. It integrates with other features such as hooks, routing, state management.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0166332de48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>