[英]Cypress Page Object Model Issue:Got an error message when I ran a test linked to PageObject
您只是在變量名中使用大寫字母有一些問題。
而不是這個
const Homepage = new HomePage(); // Homepage is the instance
HomePage.getNameBox() // uses the class not the instance
慣例是在實例的開頭使用一個小字符
const homePage = new HomePage();
homePage.getNameBox() // uses the instance
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.