Quantcast
Viewing all articles
Browse latest Browse all 2045

[Robotframework] สิ่งละอันพันละน้อยเกี่ยวกับ Google Chrome

Image may be NSFW.
Clik here to view.

Image may be NSFW.
Clik here to view.
วันนี้มีคำถามเกี่ยวกับการทดสอบ web application ด้วย Robotframework ซึ่งใช้งานร่วมกับ Selenium2Library น่าสนใจดังนี้ โดย browser หลัก ๆ จะใช้งานผ่าน Google Chrome
  1. ไม่ต้องการให้แสดงคำว่า Chrome is being controlled by automated test software
  2. ไม่ต้องการให้แสดง popup ถามว่า Do you want Google Chrome to save your password ?
  3. มี Keyword สำหรับการขยายหน้าจอให้ใหญ่ ๆ แต่ก็ไม่ทำงาน !!
  4. มี warning เกี่ยวกับ GPU !!
ดังนั้นจึงทำการสรุปไว้นิดหน่อย เมื่อเริ่มต้นทดสอบใน Google chrome แสดงคำว่า Chrome is being controlled by automated test software เป็นการบอกว่า ตอนนี้ถูกควบคุมด้วยเครื่องมือการทดสอบแบบอัตโนมัตินะ โดยปกติจะแสดงดังนี้ Image may be NSFW.
Clik here to view.
ถ้ามีการ login เข้าระบบที่เป็น HTTPS ทาง Google Chrome ก็จะถามว่า จะให้ทำการบันทึก username และ password ไว้ไหม แสดงดังรูป Image may be NSFW.
Clik here to view.
โดยปัญหาทั้ง 4 ข้อนี้แก้ไขด้วยการ แก้ไข Chrome Driver นิดหน่อย ด้วยการแก้ไข Chrome option เขียน code ได้ดังนี้ [gist id="bb46ad28b4b3ee9f961651e1a2c22e8e" file="custom.robot"] ปล. เขียนด้วยภาษา Python หรือ Java ง่ายกว่านะ

Viewing all articles
Browse latest Browse all 2045

Trending Articles