แต่เวลาเราใช้เมาส์เปิดเองมันจะเปิดเป็นแท็ปอีกแท็ป
1.ตัวอย่างการเข้า Tag A
โค้ด: เลือกทั้งหมด
<a href="http://www.google.co.th" target="_blank">Google</a>
<a href="http://www.youtube.com" target="_blank">Youtube</a>
command: storeAttribute
target: //a@href
value: test
เรียกใช้ตัวแปร test
command: open
target: ${test}
value:
** คำอธิบาย
เมือเจอคำสั่ง open จะวิ่งเข้าไปหา link ตัวแรกเสมอ หน้าเว็ปก็จะลิ้งไปที่ Google.com
2.ตัวอย่างการเข้า Tag A ตามลำดับ[]
เก็บ link ลงไปในตัวแปร test
command: storeAttribute
target: //a[2]@href
value: test
เรียกใช้ตัวแปร test
command: open
target: ${test}
value:
** คำอธิบาย
เมือเจอคำสั่ง open จะวิ่งเข้าไปหา link ตัว2ซึ่งเรากำหนดไว้ a[2]@href หน้าเว็ปก็จะลิ้งไปที่ Youtube.com