top of page

[Robot Framework]จะทำอย่างไรได้บ้างเมื่อImport Library 2ตัวมีKeywordที่ชื่อซ้ำกันอยู่

  • Nat Tantichatchawanwong
  • Dec 15, 2018
  • 1 min read

บางครั้งการImport LibraryหลายตัวลงมาในTest Suite เดียวกันอาจจะมีชื่อของKeyword ใน Library ที่ซ้ำกันบ้างยกตัวอย่างเช่น Selenium2Library และ AppiumLibrary เป็นต้น ดังนั้นมันก็ต้องมีการทำให้เราสามารถใช้ Keyword ของLibrary พวกนี้ได้แบบถูกต้อง และไม่เกิดError และมีวิธีเล็กๆน้อยๆดังต่อไปนี้

วิธีที่ : 1

ใช้ชื่อLibraryที่ต้องการนำหน้าKeywordเอาไว้ เช่น Selenium2Library.Capture Screenshot, AppiumLibrary.Wait Until Element Is Visible , etc.

วิธีที่ : 2

ใช้ Keyword ที่ชื่อว่า Set Library Search Order เรียงลำดับการใช้Keyword

Comentarios


Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page