Revisions for ⁨example.js⁩

View the changes made to this paste.

unlisted ⁨1⁩ ⁨file⁩ 2021-05-06 04:39:14 UTC

pastefile1

@@ -0,0 +1,20 @@

+describe("First Steps with WDIO", () => {
+    it("Launching example website", async () => {
+        await browser.url("http://example.com/")
+        await expect(browser).toHaveUrl("http://example.com/")
+        await expect(browser).toHaveTitle("Example Domain")
+    })
+
+    it('check link value', async () => {
+        const lnk = $("=More information...") 
+        const lnk1 = $("*=...")
+        await expect(lnk).toBeVisible()
+        await expect(lnk).toBeClickable()
+        console.log("Text for the link is:", await lnk.getText()) // getting an error here. "TypeError: lnk.getText is not a function"
+        console.log("URL for the link is:", await lnk.getAttribute("href"))
+        await expect(lnk1).toBeVisible()
+        await expect(lnk1).toBeClickable()
+        console.log("Text for the link1 is:", await lnk1.getText())
+        console.log("URL for the link1 is:", await nk1.getAttribute("href"))
+    })
+})
\ No newline at end of file