簡體   English   中英

空手道 UI:獲取當前瀏覽器的 URL

[英]Karate UI: Get current browser's URL

有沒有辦法在瀏覽器的地址欄中獲取當前的 URL ? 是否有任何替代以下不起作用的代碼,也許如此所述:

  And def url =  function() {return window.location.href}
  Then print url()

driver.url是您要找的東西: https://github.com/intuit/karate/tree/master/karate-core#driverurl

 * match driver.url == 'https://some/url'

請注意,為了避免片狀測試,這可能會更好:

 * waitForUrl('https://some/url')

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM