<?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 Eng Supatcha: on Medium]]></title>
        <description><![CDATA[Stories by Eng Supatcha: on Medium]]></description>
        <link>https://medium.com/@supatchakorn.w?source=rss-5f94e1649325------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vVY1SrmEKVK2pE1fXBYc_g.jpeg</url>
            <title>Stories by Eng Supatcha: on Medium</title>
            <link>https://medium.com/@supatchakorn.w?source=rss-5f94e1649325------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 22:10:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@supatchakorn.w/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[ทดสอบ Web FrontEnd Performance ด้วย Lighthouse ใน Chrome]]></title>
            <link>https://medium.com/@supatchakorn.w/%E0%B8%97%E0%B8%94%E0%B8%AA%E0%B8%AD%E0%B8%9A-web-frontend-performance-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-lighthouse-%E0%B9%83%E0%B8%99-chrome-56b5610438b6?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/56b5610438b6</guid>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[lighthouse]]></category>
            <category><![CDATA[forntend]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Mon, 28 Apr 2025 12:31:07 GMT</pubDate>
            <atom:updated>2025-04-28T12:31:38.524Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQZt2nvqBLOxs8-wFjOo-w.png" /></figure><p><strong>Performance คือ </strong>การประเมินความเร็วและประสบการณ์ของผู้ใช้เมื่อเข้าถึงเว็บไซต์</p><p>โดยมีคะแนนเต็ม 100 จากการคำนวณที่แบ่งออกเป็น 5 มิติ ดังนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*rpQjmhl-jtlrh58O_LEBLA.png" /></figure><ul><li>First Contentful Paint (FCP): ระยะเวลานานเท่าไหร่ที่ element, image, text หรือ อื่นๆ แสดงขึ้นในหน้าเว็บเป็นครั้งแรก</li><li>Largest Contentful Paint (LCP): ระยะเวลานานเท่าไหร่ที่ element ใหญ่สุดสามารถแสดงในหน้าเว็บ</li><li>Total Blocking Time (TBT): ระยะเวลาทั้งหมดที่หน้าเว็บถูกบล็อกไม่ให้ตอบสนองต่อการป้อนข้อมูลของผู้ใช้</li><li>Cumulative Layout Shift (CLS): การเปลี่ยนเลย์เอาต์ที่ไม่คาดคิดอาจรบกวนประสบการณ์ของผู้ใช้ได้หลายวิธี ตั้งแต่ทำให้ผู้ใช้เสียตำแหน่งขณะอ่านหากข้อความเลื่อนไปอย่างกะทันหัน ไปจนถึงทำให้ผู้ใช้คลิกลิงก์หรือปุ่มที่ไม่ถูกต้อง (วัดคะแนนรวมของการเปลี่ยนแปลงเลย์เอาต์ทั้งหมดที่เกิดขึ้นตลอดอายุการใช้งานหน้าเว็บ)</li><li>Speed Index (SI): ความเร็วที่เนื้อหาหรือข้อมูลแสดงขึ้นในระหว่างการโหลดหน้าเว็บ เช่น วีดีโอ หรือเนื้อหายาวๆ</li><li>Interaction to Next Paint (INP) (มีเฉพาะในโหมด <strong>Timespan</strong>): การตอบสนองโดยรวมของหน้าเว็บต่อการโต้ตอบของผู้ใช้ เช่นเมื่อผู้ใช้งาน คลิก เพื่อขยายเนื้อหา คือเวลาที่ render และแสดงข้อมูลออกมาให้ผู้ใช้งานเห็น</li></ul><p>Response time for Desktop on Chrome</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/919/1*roa839xQkqDaDpig5puQTA.png" /></figure><p>Response time for Mobile</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*rPHIcVH0Z61es7oZuMaShA.png" /></figure><p>How to Use</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CPmWPB9FtXbiLwQ12qCd-Q.png" /></figure><ol><li>คลิกขวา เลือก Inspector</li><li>เลือก Mode (อธิบายโหมดข้างล่าง)</li><li>เลือก Device (เลือกที่ต้องการทดสอบ)</li><li>เลือก Categories : Performance</li><li>คลิก ปุ่ม Analyzepage load เพื่อบันทึกผล</li></ol><p>แต่ละโหมด ต่างกันยังไง</p><p>แบ่งออกเป็น 3 โหมด</p><p><strong>Navigation</strong> : เป็นการวิเคราะห์การโหลดแบบหน้าเดียว</p><ul><li>Case : วิเคราะห์การเข้าถึงได้ทันทีหลังจากโหลดหน้า</li><li>ได้ผล Performance ทั้ง 5 มิติ</li><li>ไม่สามารถวิเคราะห์การส่งแบบฟอร์มหรือการเปลี่ยนหน้าแอพเดียวได้</li><li>ไม่สามารถวิเคราะห์เนื้อหาที่ไม่พร้อมใช้งานทันทีเมื่อโหลดหน้า</li></ul><p><strong>Timespan</strong> : วิเคราะห์จากการใช้งานของ User ในหนึ่งช่วงเวลา</p><ul><li>Case : ต้องการวิเคราะห์การเปลี่ยนแปลงเนื้อหาและเวลาดำเนินการของ JavaScript ในช่วงเวลาหนึ่ง รวมถึงการโต้ตอบ</li><li>สามารถแสดง Performance ได้ 3 มิติเท่านั้น</li><li>Total Blocking Time</li><li>Cumulative Layout Shift</li><li>Interaction to Next Paint</li></ul><p><strong>Snapshot</strong> : วิเคราะห์หน้าเว็บในตอนนั้นๆ แน่นการตรวจสอบ SPA (SPA การโหลดข้อมูลใหม่มาใช้แสดงผลใน DOM ส่วนใหญ่อีกครั้ง)</p><ul><li>Case : ต้องการวิเคราะห์ SPA การดึงข้อมูลมาแสดงผล</li><li>ไม่ให้คะแนนประสิทธิภาพโดยรวมหรือตัวชี้วัด</li><li>ไม่สามารถวิเคราะห์ปัญหาใดๆ นอกเหนือจาก DOM ปัจจุบันได้</li></ul><p>หลังจาก Analyze page load สำเร็จ จะได้ ผล Performance ออกมาแบบนี้</p><p>เราสามารถ กดเลือก section ที่เราต้องการดู report และ กด export report performance เพื่อนำไป Investigate ต่อไปได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*hyM6evU3OR50CtfC37Jthw.png" /></figure><p>นอกจากนี้ ยังมีคำแนะนำต่างๆให้เราไปแก้ไขอีกด้วยนะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*qF4tWnnfihVcS84KL4nzdw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=56b5610438b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Appium Inspector on Mac]]></title>
            <link>https://medium.com/@supatchakorn.w/setting-appium-inspector-on-mac-72178a5ab611?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/72178a5ab611</guid>
            <category><![CDATA[appium]]></category>
            <category><![CDATA[inspector]]></category>
            <category><![CDATA[automated-test]]></category>
            <category><![CDATA[inspect-element]]></category>
            <category><![CDATA[webdriveragentrunner]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Thu, 26 Jan 2023 17:09:45 GMT</pubDate>
            <atom:updated>2024-02-16T08:59:00.829Z</atom:updated>
            <content:encoded><![CDATA[<p>ตอนนี้ Appium Inspector ได้แยกออกจาก Appium Desktop Server แล้ว เราจะมา Setting ให้ Appium Inspector สามารถ Connect to Appium Server เผื่อใช้ในการ Inspector Element กันค่ะ</p><p>ลงตามนี้เสร็จ สามารถใช้ Run Automated Test on Mobile ได้แบบสบายๆกันเลย</p><p>ก่อนหน้านั้น ต้อง Install List นี้กันก่อนนะ</p><p>Download <a href="https://developer.android.com/studio">Android Studio</a></p><p>Download <a href="https://nodejs.org/en/download/">Node JS</a></p><p>Download <a href="https://www.oracle.com/java/technologies/javase/jdk18-archive-downloads.html">Java JDK18</a></p><h3><strong>Setting Appium Desktop Server</strong></h3><p>Download <a href="https://appium.io/downloads.html">Appium Desktop</a></p><ol><li>Go to Appium Server GUI -&gt; Advanced</li><li>Server address: localhost<br>Port: 4723<br>Allow CORP: yes</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hyhW20z775dstGzj9j-d4Q.png" /></figure><p>3. Click Edit Configurations</p><p>4. Put ANDROID_HOME = /Users/${user_mac}/Library/Android/sdk”</p><p>5. Put JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home</p><p>6. Click Save and Restart</p><p>7. Click Start Server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kT7sdKWKDEtGwvm9yMoaVg.png" /><figcaption>setting ANDROID_HOME , JAVA_HOME path ไว้สำหรับ Appium เรียกใช้งาน</figcaption></figure><p>จะได้หน้าตา Server Run ประมาณนี้ เปิดทิ้งไว้ ได้เลยจ้าา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SP0IsbCrnNOQDAIMk8tGEw.png" /></figure><p><strong>Appium Inspector Setting Android</strong></p><ol><li>Remote Host = localhost</li><li>Remote Port = 4723 &gt; Port ของ Appium server ที่เราต้องการเรียกใช้งาน</li><li>Remote Path = /wd/hub</li><li>Setting Capabilities</li></ol><pre>{<br>  &quot;platformName&quot;: &quot;Android&quot;,<br>  &quot;appium:platformVersion&quot;: &quot;13.0.0&quot;,<br>  &quot;appium:app&quot;: &quot;/Users/engsupatcha/Documents/Train/AppDemo/app-debug.apk&quot;,<br>  &quot;appium:udid&quot;: &quot;emulator-5554&quot;,<br>  &quot;appWaitActivity&quot;: &quot;com.trainapp.MainActivity&quot;<br>}</pre><p>5. เปิด Emulator Android ทิ้งไว้</p><p>6. Click Start Session</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hke_uebnLA7rO_c_NU1DoQ.png" /></figure><p>จะได้ หน้าต่าง Inspector รูปแบบเดิมที่เคยใช้งานจ้าา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xoyyJNsYAeTgGANob7jYCg.png" /></figure><p><strong>Appium Inspector Setting iOS</strong></p><p>ยากกว่า Android นิดหน่อย แต่มาเริ่มกันเลย</p><p>Install ตาม List ข้างล่างได้เลยจ้าา ผ่าน Terminal น้าาา</p><pre>Install brew &gt; /bin/bash -c &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&quot;<br>brew install node <br>sudo npm install -g appium<br>sudo npm install wd<br>brew install ideviceinstaller<br>brew install carthage<br>brew install -g ios-deploy<br>sudo gem install xcpretty<br>brew install libimobiledevice --HEAD<br>sudo npm install -g appium-doctor  // เพิ่มอันนี้ด้วยนะ ใช้สำหรับ เช็คว่าเราลงของควรรึยัง<br>appium-doctor --ios // คำสั่งนี้ จะแสดงรายการว่า เราลงของครบมั้ย</pre><p>รายการประมาณนี้เด้อออ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2x3du_7pAQIJWsqTEWZCRQ.png" /></figure><p><strong>Install WebAgentRunner</strong></p><pre>npm install -g appium-webdriveragent<br>cd /usr/local/lib/node_modules/appium-webdriveragent<br>xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination &#39;id=5DA93541-A424-40C3-BE69-09D6EBA26B51&#39; test</pre><p>id = uuid ของ iPhone &gt; ตัวอย่าง 5DA93541-A424–40C3-BE69–09D6EBA26B51</p><p>โดยหาจาก</p><pre>xcrun simctl list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eupZqTWDGnioLT47Cby6Wg.png" /></figure><p>start WebAgentRunner ไว้สำหรับใช้ Inspector โดยเราจะใช้ xcode build Project WebDriverAgent ในรูปแบบการ <strong>test mode</strong> เพื่อจะได้ไม่ต้องใช้ Account Apple Developer ต้องเปิด test mode ทิ้งไว้ขณะ Run Inspector หรือ Run Automated Test ด้วยนะทุกคน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UXpDdqwEEZZvDBoiDbjpJA.png" /></figure><p><strong>กลับมาที่ Setting Appium Inspector iOS</strong></p><ol><li>Remote Host = localhost</li><li>Remote Port = 4723 &gt; Port ของ Appium server ที่เราต้องการเรียกใช้งาน</li><li>Remote Path = /wd/hub</li></ol><pre>{<br>  &quot;platformName&quot;: &quot;iOS&quot;,<br>  &quot;appium:platformVersion&quot;: &quot;16.2&quot;,<br>  &quot;appium:app&quot;: &quot;/Users/engsupatcha/Documents/Train/AppDemo/trainApp.app&quot;,<br>  &quot;appium:automationName&quot;: &quot;XCUITest&quot;,<br>  &quot;appium:deviceName&quot;: &quot;iPhone 14 Pro&quot;,<br>  &quot;appium:device&quot;: &quot;iPhone 14 Pro&quot;<br>}</pre><p>4. เปิด Simulator iOS ทิ้งไว้</p><p>5. Click Start Session</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gdbikLpyDzMlwGe-gE0gBg.png" /></figure><p>ได้แล้วจ้าาาา เหมือนเดิมเลยยยย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yfkkHbToVwEPbCXPpemuAA.png" /></figure><p><strong>Note :</strong></p><p>ประกาศ Path Environment (.zshrc or .bash_profile)</p><pre>ประกาศ Enviroment (.zshrc or .bash_profile)<br>export JAVA_HOME=&quot;/Library/Java/JavaVirtualMachines/jdk-18.0.2.1.jdk/Contents/Home&quot;<br>export ANDROID_HOME=&quot;/Users/${user}/Library/Android/sdk&quot;<br>export PATH=&quot;$PATH:$ANDROID_HOME/platform-tools&quot;<br>export PATH=&quot;$PATH:$ANDROID_HOME/tools&quot;<br>export PATH=&quot;$PATH:$ANDROID_HOME/tools/bin&quot;<br>export PATH=&quot;$PATH:$ANDROID_HOME/emulator&quot;</pre><p><strong>Check list simulator</strong></p><pre>xcrun simctl list<br>xcrun simctl shutdown C8C050F3–062D-4444-A888-BBEC783E31BD //udid iPhone<br>xcrun simctl erase C8C050F3–062D-4444-A888-BBEC783E31BD<br>xcrun simctl boot C86A559A-1F50–40D1–8D84–954EDFBBCE18</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72178a5ab611" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[คำสั่งหา App Package และ App Activity อย่างง่าย]]></title>
            <link>https://medium.com/@supatchakorn.w/%E0%B8%84%E0%B8%B3%E0%B8%AA%E0%B8%B1%E0%B9%88%E0%B8%87%E0%B8%AB%E0%B8%B2-app-package-%E0%B9%81%E0%B8%A5%E0%B8%B0-app-activity-%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2-c88dd3257ce1?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/c88dd3257ce1</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[adb]]></category>
            <category><![CDATA[activity-app]]></category>
            <category><![CDATA[automated-test]]></category>
            <category><![CDATA[apppackage]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Wed, 25 Jan 2023 17:12:53 GMT</pubDate>
            <atom:updated>2023-01-25T17:12:53.489Z</atom:updated>
            <content:encoded><![CDATA[<p>เปิดแอพในเครื่อง Android ทิ้งไว้</p><p>run command line : adb shell dumpsys window | grep -E ‘mCurrentFocus’</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Anu5ePPIZd7o4QuG4mTLPw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c88dd3257ce1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robotframework Run Selenium Chrome in Docker]]></title>
            <link>https://medium.com/@supatchakorn.w/robotframework-run-selenium-chrome-in-docker-5bdc6edd0a7e?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/5bdc6edd0a7e</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[robot-framework]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[chromedriver]]></category>
            <category><![CDATA[chrome]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Tue, 15 Sep 2020 17:27:52 GMT</pubDate>
            <atom:updated>2023-04-22T17:49:33.968Z</atom:updated>
            <content:encoded><![CDATA[<h3>Robotframework Run Selenium Chrome in Docker for Mac Chip Intel</h3><p>หลายๆคนอาจจะเคยเจอปัญหาในการ Setting Robotframework ในการรัน web browser วันนี้อิงเลยจะชวน ชาว QA ทั้งหลาย มาลองเปลี่ยนการรัน Robotframework จากใน Windows หรือ Mac มารันใน Docker กันจ้า</p><p>Q : มันแตกต่างจากการรัน ปกติยังไงกัน ???</p><p>Ans : แทบไม่ต่างจ้า</p><p>Q : แล้วทำไมต้องรันใน Docker ด้วยละ ???</p><p>Ans : เพราะจาก ปัญหาที่เราเจอกันก็คือ การ Setting และรันในเครื่องต่าง ไม่เหมือนกันนั้นเอง เลยทำให้เจ้า Docker เข้ามามีส่วนร่วมกับ QA อย่างเราๆ</p><p>Q : ช่วย เรายังไงบ้างนะ ???</p><p>Ans : เราสามารถสร้าง Dockerfile ที่เก็บพวก Dependencies , Library และ อื่นๆ ที่เราต้องการ install หรือ setting ไว้ในไฟล์เดียวได้เลย และเราสามารถนำ Dockerfile นี้ไปรันใน Docker ไหนก็ได้ โดยที่เราไม่ต้องมาเสียเวลา Setting ใหม่หลายๆรอบ เปลืองเวลามากเว่อออ</p><p>ตัวอย่าง โปรเจคนะจ๊ะ ถ้าขี้เกียจอ่าน &gt;&lt; อิงก็ Comment ไว้ตาม Code ให้แล้ววว</p><p><a href="https://gitlab.com/supatchakorn.w/seleniumchromerobotframeworkindocker">https://gitlab.com/supatchakorn.w/seleniumchromerobotframeworkindocker</a></p><p>เรามาเริ่มจาก การสร้าง Dockerfile กันเลยดีกว่าจ้า</p><p>Dockerfile นี้สำหรับ Run Chip Intel ใน Mac</p><pre>FROM python:3.8<br><br># install google chrome<br>RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -<br>RUN sh -c &#39;echo &quot;deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main&quot; &gt;&gt; /etc/apt/sources.list.d/google-chrome.list&#39;<br>RUN apt-get -y update<br>RUN apt-get install -y google-chrome-stable<br><br># install chromedriver<br>RUN apt-get install -yqq unzip<br>RUN wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip<br>RUN unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/<br><br>RUN chmod 777 /usr/local/bin/chromedriver<br><br># install font for other language<br>RUN apt-get update &amp;&amp; \<br>    apt-get install -y \<br>        fonts-ipafont-gothic fonts-ipafont-mincho \<br>        ttf-wqy-microhei fonts-wqy-microhei       \<br>        fonts-tlwg-loma fonts-tlwg-loma-otf       \<br>    &amp;&amp; apt-get clean &amp;&amp; rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*<br><br>RUN python3 -m pip install --upgrade pip<br>COPY requirements.txt /tmp/requirements.txt<br>RUN  pip3 install -r /tmp/requirements.txt</pre><p>ต่อมา ตามด้วย List Dependencies ที่เราต้องการ Install</p><pre>pandas==1.0.5<br>urllib3==1.25.9<br>robotframework==3.2.1<br>robotframework-seleniumlibrary==4.4.0<br>selenium==3.141.0</pre><p>ลองมาสร้าง Test Case ง่ายลองรันดูกันเถอะ</p><pre>*** Settings ***<br>Library     <em>SeleniumLibrary<br></em>Test Teardown       Close Browser<br><br>*** Variables ***<br>${URL}  https://www.google.com<br>${txtSearch}  //*[@name=&quot;q&quot;]<br><br><br>*** Test Cases ***<br>Open Browser<br>    ${chrome_options}=    Evaluate    sys.modules[&#39;selenium.webdriver&#39;].ChromeOptions()    sys<br>    Call Method    ${chrome_options}    add_argument    --disable-dev-shm-usage  #disable page crash of chrome<br>    Call Method    ${chrome_options}    add_argument    --no-sandbox  #disable sandbox mode<br>    Call Method    ${chrome_options}    add_argument    --headless  #run with no web browser<br>    Create Webdriver    driver_name=Chrome    alias=google    chrome_options=${chrome_options}    executable_path=/usr/local/bin/chromedriver<br>    Set Window Size    1200    1000  #run on docker can&#39;t use Maximize Browser Window<br>    Go To    ${URL}<br>    Wait Until Element Is Visible  ${txtSearch}  10s<br>    Input Text  ${txtSearch}  Robotframework<br>    Press Keys  ${txtSearch}  RETURN<br>    Capture Page Screenshot  Robotframework.png</pre><p>เราใช้ Create Webdriver แทนเพราะเราต้องการ Set chrome_options และ executable_path (path chromedriver)</p><p>Docker Run ผ่าน Terminal</p><pre>docker build --rm -f &quot;Dockerfile&quot; -t gcrobot:qa .</pre><p>docker build → docker จะเอาคำสั่งทั้งหมดใน Dockerfile มา build เป็น Docker Image</p><p>--rm → หลังจาก build Image เสร็จ ก็จะลบ Container ที่ใช้ในการ build Image ทิ้ง</p><p>-f → ใส่ path Dockerfile ที่จะเอามา build image</p><p>-t → ตั้งชื่อ Docker Image และ ชื่อ Tag</p><p>. → build จากตำแหน่งปัจจุบัน</p><p>หลังจากได้ Docker Image มาแล้ว ต่อไป มาลอง Create Container และ Run TestCase กันได้เลย</p><pre>docker run --rm -v $(pwd):/workspace:cached -w /workspace gcrobot:qa python3 -m robot *.robot</pre><p>docker run → Docker Image จะถูกเอามาสร้าง เป็น Container ไว้ใช้สำหรับรัน Robotfrsmework</p><p>--rm → หลังจาก รันหรือใช้ Container นี้เสร็จ ก็จะลบ Container ทิ้งไป</p><p>-v v1:v2 → Bind mount a volume (map volume local กับ docker)</p><p>v1 = path volume at local</p><p>v2 = path volume at docker</p><p>-w → Directory ที่จะใช้งานใน Docker</p><p>gcrobot:qa → ชื่อและTag ของ Docker Image ที่เราจะเอามาสร้างและรัน</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fv381GJ0vuFw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dv381GJ0vuFw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fv381GJ0vuFw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f3c35b344d6a7b4f3698c84c966ca6ee/href">https://medium.com/media/f3c35b344d6a7b4f3698c84c966ca6ee/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5bdc6edd0a7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[เมื่อเรามีการ รัน Automate test สิ่งที่สำคัญที่สุดอย่างหนึ่งก็คือ locator เพราะ locator…]]></title>
            <link>https://medium.com/@supatchakorn.w/%E0%B9%80%E0%B8%A1%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B9%80%E0%B8%A3%E0%B8%B2%E0%B8%A1%E0%B8%B5%E0%B8%81%E0%B8%B2%E0%B8%A3-%E0%B8%A3%E0%B8%B1%E0%B8%99-automate-test-%E0%B8%AA%E0%B8%B4%E0%B9%88%E0%B8%87%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%AA%E0%B8%B3%E0%B8%84%E0%B8%B1%E0%B8%8D%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%AA%E0%B8%B8%E0%B8%94%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%AB%E0%B8%99%E0%B8%B6%E0%B9%88%E0%B8%87%E0%B8%81%E0%B9%87%E0%B8%84%E0%B8%B7%E0%B8%AD-locator-%E0%B9%80%E0%B8%9E%E0%B8%A3%E0%B8%B2%E0%B8%B0-locator-a80665660ba3?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/a80665660ba3</guid>
            <category><![CDATA[automated-testing]]></category>
            <category><![CDATA[locator]]></category>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[robot-framework]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Fri, 25 Oct 2019 04:31:05 GMT</pubDate>
            <atom:updated>2019-10-25T04:31:05.707Z</atom:updated>
            <content:encoded><![CDATA[<h3>Locator of Selenium for Robotframework</h3><p>เมื่อเรามีการ รัน Automate test สิ่งที่สำคัญที่สุดอย่างหนึ่งก็คือ locator เพราะ locator คือจุดที่จะระบุตำแหน่งของแต่ละ Element ที่ต้องการให้เกิด Action ต่างๆ และ locator ก็สามารถเขียนได้หลากหลายรูปแบบ ตอนนี้งานของเราส่วนใหญ่ใช้ xpath เราลองมาดู Syntax Locator แบบอื่นๆดูบ้าง ซึ่งถ้า locator แต่ละตัวมีความ unique ของมันเอง เราสามารถเขียนในรูปแบบที่สั้นกว่า xpath ได้</p><p><strong>1. Find locator by ID</strong></p><pre>Syntax -&gt; id:id of the element</pre><pre>Ex : id:email</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*QMU7bqztK_C0Gy-k.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*gAuWJQKtJnIe_RtB.png" /></figure><p><strong>2. Find locator by Name</strong></p><pre>Syntax -&gt; name:name of the element</pre><pre>Ex : name=email</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*33UVgJNOQF_ssexN.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*SjCjw7l9_ESF8V78.png" /></figure><p><strong>3. Find locator by Link or Partial Link</strong></p><pre>Syntax -&gt; link:link_text or partial link:some_text_of_link</pre><pre>Ex : link:สร้างเพจ or partial link:สร้าง</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*V9vgH_A6OuwzySQc.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/0*k5v0h_wRqRzKdXhl.png" /></figure><p><strong>4. Find locator by CSS selector</strong></p><pre>Syntax — tag and id -&gt; css:tag#id</pre><pre>Ex : css:input#email</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*S_AEnBpOqKzucmFl.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*MEfqudlkwfc9oegh.png" /></figure><pre>Syntax — tag and class -&gt; css:tag.class</pre><pre>Ex : css:input.inputtext</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*UlyGxHHVx7tmh5xb.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*dg5k9KZ6tt7J-RLo.png" /></figure><pre>Syntax — tag and attribute -&gt; css:tag[attribute=value]</pre><pre>Ex : css:input[tabindex=&quot;1&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*uzHWuH9OQT0_Wfj9.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/0*a4xeoaffRyqtL7jE.png" /></figure><pre>Syntax — tag, class, and attribute -&gt; css:tag.class[attribute=value]</pre><pre>Ex : css:input.inputtext[tabindex=&quot;1&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*bwXCKBsYHKou5W9D.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/0*ttEcmDBd1WNyIDHA.png" /></figure><p><strong>5. Find locator by Xpath</strong></p><p>Xpath มีการเขียนหลายรูปแบบมาก ข้าเลยได้สร้างขึ้นมากอีก เพจนึง ตามมาดูได้เลยจร้าาา <a href="https://medium.com/@supatchakorn.w/%E0%B8%A1%E0%B8%B2%E0%B8%A3%E0%B8%B9%E0%B9%89%E0%B8%88%E0%B8%B1%E0%B8%81%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99-xpath-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-5fd221ade027"><strong>มารู้จักการเขียน Xpath กันเถอะ</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a80665660ba3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[มารู้จักการเขียน Xpath กันเถอะ]]></title>
            <link>https://medium.com/@supatchakorn.w/%E0%B8%A1%E0%B8%B2%E0%B8%A3%E0%B8%B9%E0%B9%89%E0%B8%88%E0%B8%B1%E0%B8%81%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%80%E0%B8%82%E0%B8%B5%E0%B8%A2%E0%B8%99-xpath-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-5fd221ade027?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fd221ade027</guid>
            <category><![CDATA[robot-framework]]></category>
            <category><![CDATA[automated-testing]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[locator]]></category>
            <category><![CDATA[xpath]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 08:41:43 GMT</pubDate>
            <atom:updated>2019-10-23T08:41:43.215Z</atom:updated>
            <content:encoded><![CDATA[<p>ในงาน automate test มีการเขียน locator ได้หลายรูปแบบ แต่ที่แนะนำมากๆก็คือ การเขียนแบบ xpath โดยการค้นหา locator แบบ xpath นั้นจะหาตามโครงสร้างของ XML document นอกจากนั้นยังสามารถเขียน Operators เข้าไปใน xpath ได้อีกด้วย</p><p>ตัวอย่างโครงสร้างของ XML document ที่ควรรู้ในการเขียน xpath</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*NOTtErZEAVtYvDt9.png" /></figure><p>xpath แบ่งออกเป็น 2 แบบ</p><p><strong>1. Absolute XPath</strong> คือการเขียนแบบค้นหาตาม tag name ตรงๆ</p><p>Example : html/body/div/div[2]/div/div/div/div/div[2]/form/table/tbody/tr[2]/td[1]/input[1]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*nyio_i0GDMy78fYC.png" /></figure><p><strong>2. Relative XPath</strong></p><p>เมื่อเราเขียนแบบ Ralative xpath มันสามารถเริ่มต้นค้นหา element ได้จากระบุ tag name , attribute name หรือ value ได้เลย โดยไม่ต้องเริ่มจาก tag แรกของ XML document เหมือนกับ Absolute XPath ซึ่งจะทำให้มีความแม่นยำมากกว่าและเข้าใจได้ง่ายกว่าอีกด้วย</p><pre>Syntax for XPath : //tagname[@attribute=&quot;value&quot;]</pre><p>// คือ เริ่มต้นค้นหาจาก tag name</p><p>@ คือ attribute name</p><p>/ คือ ค้นหา child tag จาก current tag</p><p>* คือ ค้นหาจากทุก tag หรือ attribute</p><p>.. คือ ค้นหา parents tag of current tag</p><p><strong>1. Basic Xpath</strong></p><pre>Example 1. //input[@name=&quot;email&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*zfbQZ-V1IJVd7wor.png" /></figure><p>// คือ เริ่มต้นค้นหา tag name ที่มีชื่อว่า input</p><p>@ คือ ค้นหา attribute name ชื่อ name และมี value = email</p><pre>Example 2. //*[@id=&quot;search-input&quot;]/input[@id=&quot;search&quot;]</pre><p>* คือ ค้นหาทุก tag</p><p>/ คือ ค้นหา child tag ที่มีชื่อว่า input</p><p><strong>or</strong> //*[@*=”search-input”]/input[@id=”search”]</p><p>* คือ ค้นหาทุก tag และ attribute ที่มี value = search-input</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*xkIxayx_-fHvsfoF.png" /></figure><pre>Example 3. //input[@id=&quot;search&quot;]/../../paper-tooltip</pre><p>.. คือ ค้นหา parents tag ใน xpath นี้ใส่ไว้ 2 ชุด แสดงว่าหา parents tag ขึ้นไป 2 ชั้น</p><p>/ คือ ค้นหา child tag name = paper-tooltip</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*7Z_klHPTlOCwo4qH.png" /></figure><p>​<strong>2. Xpath แบบ Contains() function : </strong>เราสามารถเขียนให้ xpath ค้นหาด้วย partial value</p><pre>Syntax : //tagename[contains(@attribute,&quot;partial value&quot;)]</pre><pre>Example 1. //*[contains(@value,&quot;ค้นแล้วเจอ&quot;)]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*B1XGOHVBmxC6gmAK.png" /></figure><p>​<strong>3. Xpath แบบ Start-with function</strong> : ตามชื่อเลยค่ะ ค้นหา xpath ที่มี value เริ่มต้นด้วยค่าที่เราใส่เข้าไป</p><pre>Syntax : //tagename[starts-with(@attribute,&quot;start-with value&quot;)]</pre><pre>Example 1. //*[starts-with(@id,&quot;search-&quot;)]</pre><p>สามารถนำไปใช้ เมื่อเราต้องการ match หลาย element</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*US9vdPJxqZnDbelh.png" /></figure><p><strong>4. Xpath by Text () </strong>: เป็นการค้นหา Element โดยค้นหาจาก Text</p><pre>Syntax : //tagename[text()=&quot;Text Value&quot;]</pre><pre>Example 1. //*[text()=&quot;อีเมลหรือโทรศัพท์&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*FmsabvoGm3kZkG3F.png" /></figure><p>​​<strong>5. Select Last Xpath</strong> : Last() function จะค้นหา Element สุดท้ายที่ Match ได้จาก Xpath ที่เราระบุ</p><pre>Syntax : //tagename[starts-with(@attribute,&quot;value&quot;)][last()]</pre><pre>Example 1. //div[starts-with(@id,&quot;search-&quot;)][last()]</pre><p>มันจะ Match กับ Xpath ตัวสุดท้ายที่ซ้ำกัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*Abf2dU1AY5w42EcA.png" /></figure><pre>​Example 2. //div[starts-with(@id,&quot;search-&quot;)][last()-1]</pre><p>มันจะ Match กับ Xpath <strong>ก่อน </strong>ตัวสุดท้ายที่ซ้ำกัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*jQ9T5rFwerWxImLC.png" /></figure><p>​<strong>6. Use And , Or in Xpath</strong></p><pre>Syntax : //tagename[@attribute1=&quot;value1&quot; or @attribute2=&quot;value2&quot;]</pre><pre>Example 1. //*[@id=&quot;search&quot; or type=&quot;text1&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*VILL5CLLskkMD142.png" /></figure><pre>​​Syntax : //tagename[@attribute1=&quot;value1&quot; and @attribute2=&quot;value2&quot;]</pre><pre>Example 2. //*[@name=&quot;search_query&quot; and @placeholder=&quot;ค้นหา&quot;]</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*4lWGHmqH483TVItQ.png" /></figure><p>ตัวอย่าง 3. การใช้ and , or ร่วมกัน</p><pre>xpath=//*[@resource-id=&quot;segment_button&quot; and (@text=&quot;ทดสอบ&quot; or @text=&quot;Test&quot;)]</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fd221ade027" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compare Image ด้วย Image Magick On Robotframework]]></title>
            <link>https://medium.com/@supatchakorn.w/compare-image-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-image-magick-on-robotframework-c6e45ca7b58c?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6e45ca7b58c</guid>
            <category><![CDATA[robot-framework]]></category>
            <category><![CDATA[magick]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[compare-images]]></category>
            <category><![CDATA[automated-testing]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 07:55:39 GMT</pubDate>
            <atom:updated>2019-10-23T07:55:39.101Z</atom:updated>
            <content:encoded><![CDATA[<p>หลายๆคนคงเคยได้ยินการ Verify image หรือ Compare image เพื่อเอามาใช้ในงาน Automate test กันมาบ้างแล้ว และมี Tools หลายๆตัวที่สามารถนำมาใช้งานได้ แต่วันนี้เราจะมาสอนใช้ Image magick tools ในการ Compare image เพื่อใช้ในการ Verify image on Robotframework</p><p>ก่อนเลย ทุกคนควรจะลง Image Magick ในเครื่องให้เรียบร้อย ซึ่งสามารถทำตามได้ตามลิ้งนี้</p><p><strong>Install image magic on windows</strong></p><p><a href="https://imagemagick.org/script/download.php">https://imagemagick.org/script/download.php</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*oZhNb0adAOpKkDjs.png" /></figure><p><strong>Install image magic on Mac</strong></p><p>open terminal -&gt; brew update<br>open terminal -&gt; brew install imagemagick</p><p>Set the MAGICK_HOME environment variable to the path</p><p>Open .bash_profile</p><pre>export MAGICK_HOME=&quot;/usr/local/Cellar/imagemagick/7.0.8–14&quot; -&gt; path ตามที่ install ไป</pre><pre>export PATH=&quot;$MAGICK_HOME/bin:$PATH&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*ERhihA4LJ8FZalBD.png" /></figure><blockquote>ทุกครั้งที่เรามีการ Verify Element เราควรที่จะมี Reference Element อยู่ในเครื่องอยู่แล้ว การ Verify Image ก็เช่นกัน เราควรมีรูปที่เป็น Reference Image เก็บไว้สำหรับ Compare กับ Actual Image</blockquote><p>Step 1. สร้าง Folder และเก็บรูปที่เป็น Reference Image</p><p>Path : E:\\Robotframework\\Reference_Image\\OpenEN.png</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/0*rB-M5U3lFidLXT7K.png" /></figure><p>Step 2. สร้าง Folder และเก็บรูปที่ต้องการเอามา Compare กับ Reference Image</p><p>Path : E:\\Robotframework\\Actual_Image\\OpenEN.png</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/0*JsikefL6nbVCW1WW.png" /></figure><p>Step 3. เรามาเริ่มเขียนKeyword สำหรับใช้ในการ Compare image กันเลย</p><p>เราจะใช้คำสั่ง magick ที่เป็น command line โดยสั่งผ่าน Robotframework และ Return ค่ามาใช้ในการ Verify image</p><blockquote>ค่า Output ที่ Return กลับมาจะมีค่าระหว่าง 0–1</blockquote><blockquote>0 คือ รูปภาพไม่ได้มีความแตกต่างเลยหรือก็คือ ภาพเหมือนกันนั้นเอง</blockquote><blockquote>1 คือ รูปทั้ง 2 แตกต่างกัน 100%</blockquote><p>${Reference_Image_Path} : Path of Reference Image</p><p>${Actual_Image_Path} : Path of Actual Image</p><p>${width} , ${height} : ขนาดความกว้าง สูง ของรูปในการ Compare</p><p>${Allowed_Threshold} : ค่าความต่าง เพื่อในไปใช้ในการเช็ค Result</p><h3>Keyword</h3><p><strong>Compare Images</strong></p><pre>[Arguments]  ${Reference_Image_Path}  ${Actual_Image_Path}  ${width}  ${height}  ${Allowed_Threshold}=0.4</pre><pre>${COMMAND}  Set Variable  magick &quot;${Reference_Image_Path}&quot; &quot;${Actual_Image_Path}&quot; -resize &quot;${width}&quot;x&quot;${height}&quot; -metric RMSE -compare -format \ &quot;%[distortion]&quot; info:</pre><pre>Log  Executing: ${COMMAND}</pre><pre>${RC}  ${OUTPUT}=  Run And Return Rc And Output  ${COMMAND}</pre><pre>Log  Return Code: ${RC}</pre><pre>Log  Return Output: ${OUTPUT}</pre><pre>${RESULT}  Evaluate  ${OUTPUT} &lt; ${Allowed_Threshold}</pre><pre>[Return]  ${RESULT}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*0HqAyjhmxfca-ZNv.png" /></figure><h3><strong>Test Case</strong></h3><p><strong>Compare Image with Same Image</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*HkgUnekmYYl3C2zt.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*BRPOxRg2li6G7KVR.png" /></figure><p><strong>Compare Image with Difference Image</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*_g7arDvmsqRvBvAa.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*Am8bkB_J7AdGJyOZ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6e45ca7b58c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Robotframework connect SQL database]]></title>
            <link>https://medium.com/@supatchakorn.w/robotframework-connect-sql-database-f9d4a22d930?source=rss-5f94e1649325------2</link>
            <guid isPermaLink="false">https://medium.com/p/f9d4a22d930</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[automated-testing]]></category>
            <category><![CDATA[qa]]></category>
            <category><![CDATA[robot-framework]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Eng Supatcha:]]></dc:creator>
            <pubDate>Wed, 23 Oct 2019 07:39:05 GMT</pubDate>
            <atom:updated>2019-10-23T07:39:05.598Z</atom:updated>
            <content:encoded><![CDATA[<p>บทความนี้ จะมาสอนใช้ Robotframework connect SQL database และดึงข้อมูลออกมาใช้งานกัน ไม่เกริ่นเยอะ เพราะมันสามารถนำไปใช้ประโชยน์ได้หลายรูปแบบ แล้วแต่ว่างานเรากำลังทำอะไรนะจ๊ะ</p><p>ก่อนอื่นใดนั้น ลง Library กันก่อนเลยนาจา</p><p>command line : pip install robotframework-databaselibrary</p><p>Step 1. สร้าง Test Suite และ Import Library กันเลยจ๊ะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/0*OYFZxy5dnu8q3027.png" /></figure><p>Step 2. สร้างตัวแปรต่างๆที่เอาไว้ เก็บค่า ในการ Connect Database กัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/0*E5CV_93r0tYscukX.png" /></figure><p>Step 3. เรามา Connect Database กันเลยเถอะ ทุกอย่างครบแล้วนิ</p><p><strong>Test Case</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*AA_QpJRnZQTxF9j-.png" /></figure><p><strong>Result</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*D--W6hN2_0_VjqGA.png" /></figure><p><strong>สามารถดู Keyword เพิ่มเติมได้ตามลิ้งเลยค่ะ</strong> <a href="https://franz-see.github.io/Robotframework-Database-Library/api/0.5/DatabaseLibrary.html"><strong>Robotframework-Database-Library</strong></a></p><p>​</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f9d4a22d930" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>