From 970b66bb9673697550f74e2789d252e1dd8a1323 Mon Sep 17 00:00:00 2001 From: Mohammad Ziaur Rahman Date: Fri, 27 Jun 2025 20:41:49 -0500 Subject: [PATCH 1/3] added 3 test cases for bstack demo page --- browserstack.yml | 16 ++++++++-------- local.log | Bin 14408 -> 8977 bytes tests/bstack_test_demo.js | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 tests/bstack_test_demo.js diff --git a/browserstack.yml b/browserstack.yml index 931609d..0a56e1c 100644 --- a/browserstack.yml +++ b/browserstack.yml @@ -3,23 +3,23 @@ # ============================= # Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and # BROWSERSTACK_ACCESS_KEY as env variables -userName: YOUR_USERNAME -accessKey: YOUR_ACCESS_KEY +userName: mohammadzrahman1 +accessKey: 41vQVzKgxozzAxieu4fQ # ====================== # BrowserStack Reporting # ====================== # The following capabilities are used to set up reporting on BrowserStack: # Set 'projectName' to the name of your project. Example, Marketing Website -projectName: BrowserStack Samples +projectName: BrowserStack Samples # Set `buildName` as the name of the job / testsuite being run -buildName: browserstack build +buildName: browserstack build # `buildIdentifier` is a unique id to differentiate every execution that gets appended to # buildName. Choose your buildIdentifier format from the available expressions: # ${BUILD_NUMBER} (Default): Generates an incremental counter with every execution # ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30 # Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests -buildIdentifier: '#${BUILD_NUMBER}' # Supports strings along with either/both ${expression} +buildIdentifier: "#${BUILD_NUMBER}" # Supports strings along with either/both ${expression} # ======================================= # Platforms (Browsers / Devices to test) @@ -60,9 +60,9 @@ parallelsPerPlatform: 1 browserstackLocal: true # (Default false) # browserStackLocalOptions: # Options to be passed to BrowserStack local in-case of advanced configurations - # localIdentifier: # (Default: null) Needed if you need to run multiple instances of local. - # forceLocal: true # (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel. - # Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections +# localIdentifier: # (Default: null) Needed if you need to run multiple instances of local. +# forceLocal: true # (Default: false) Set to true if you need to resolve all your traffic via BrowserStack Local tunnel. +# Entire list of arguments available here -> https://www.browserstack.com/docs/automate/selenium/manage-incoming-connections framework: playwright source: node-js-playwright-sample-sdk:v1 diff --git a/local.log b/local.log index e1e494edc9d3b57fa3a940faa6c666f194460f38..f06f83e9e1b2c9ec834a43487299cbd376d6fbed 100644 GIT binary patch literal 8977 zcmeHN&u<&Y6)w`GKnSqy!9jr(ZKq5D+o^WBKgr!O96*+3%XMTjS_)1f2*GMKq!yxf zHZw!ZjO#<&peRt}mP;?a_R?Mov_PAi_>c9?@`osDhM}c(4nbf;wz$Lh&AfTvd*8g- zO637d(QgJBa+=7o93OsQr-|Jr_L}J7cE_-M%R;v{?ssk@!$9}aEM`N*$w{1vG(pb@ z<0;Kh%F(mH3{BgAMS~F$BF%b;4n#f>DCUSf7c7>B4=5+-G!;jPkxvJN3zWxzmi6=y zZlj@?bR=R{fFv~Qro91+g`6||#%Z4*`0tSrIj-0HG>Q91lnd_xj9 z8=FzIkA6!BD2X$a(Nh#B3E>42faJ~)rT>TdDdD9vEq43>971wjXlp2D+=5;nk= zhixlR;ONPEBT2DkS6q~%iUXZ<5U0s85i%eoEIBln zxJzkyGGTIvydE{z+nEN*`dkZYC2?Eqwf%I{OkmBwue zv@D5~#cjX|mf_fqhF=P|Z3o+dDjMdw4Yfy*Oc?P%&~DoAuU^Bo=9ketuyr;3HB4lI z@z+BLRatTclPec_>CaFV7?WjOD)O$r$lD%nIx5!8Z@n&aX+((D=92yP?LfERWuY%@ z@)gXws*0|&v-)B5&+ zCV=#Y(%b?8nyzVwp6OW7&{Oxo0t~iXWrJ|$*`3Xgb~mHW{@w+@KHTh}I;;0Mv(1F{ z(N?F^uG^+vt*k?zEEgEPUw^+^*@ZrsvEBngjL~+QFv@9H7#nPu3%cHZRJSeDs#dmS zr*6)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R|LZOki3qu0-`o(maIdE`GhY?v}OgFYUc9>5@$BCudmm`ai z>|#+Rqs}3bq2!JV28A@!KXXGvI6i9pxGuE0o-M4JrGMmhI96X!Nd4DOKRqQn8b5Oa zwr=j(FPvU8&#Jv$h}nk8^x(mRuki1|^TTFb-(aGBDTC&9zgPR4)$JCe=-c&pt@f+; z{l7=xkJb5R*vn*m*u0rW(*5I8wtotKH+kOltKC+;A9lT3T@Htlj=tY+R`2%e@`KtP zwp-yoe)7)=`Oh+c$He}+-`t$B7eUR0&=%;Fx1<*e$EO%I@%B77#FYQI{f8k7u|rN~ z`qs27;iBNNtm0XaaNKkQ!$jD^$*T3TeiVVED$$9F!%E8F-2n_I0%EhH_57bjP8yPLB#?mB4*Xh6lz)^ zxM(k1b_oC3!Z;b8;wR9NM>%0;j>g#_-KIQYT1~RkOf)Eo*ap?}n3;=Nc=@W^+_O-0 zMlB^)v%tHB8k!WBSRfJ{j$7&;E22G>xjSw_(xxgeIT@T)A6Mje#1l4OQy95nfIAW8 z8|C{}DhER}A68$f_pBaVVuA?cazT~_r=md+9F5RGLsC`{#4zmmtWJ!6B6f5nQ#A;J zi#$xj{Ssktiv$Nt^a4OpVZcG{T0`S?)V0XI1GrGn6Wywsw@*W(#~mtE|^=$HMY8=Q#tAd2T6wBG|AK@ zcI0gPj_5hDVuq2GVrD?k78eMEt0dau=$h4NB^^dMxX0#bBF@S%4s!(-$b^XN$}AGp zbQr { + await page.goto("https://bstackdemo.com/"); +}); + +test("BStackDemo test home page", async ({ page }) => { + const title = await page.title(); + expect(title).toContain("StackDemo"); +}); + +test("BStackDemo test home page logo", async ({ page }) => { + await page.locator(".Navbar_logo__2655Y").isVisible(); +}); + +test("BStackDemo test attribute", async ({ page }) => { + const links = page.locator("a"); + const count = await links.count(); + for (let i = 0; i < count; i++) { + const href = await links.nth(i).getAttribute("href"); + + if (i === 0) { + expect(href).toEqual("/"); + } + } +}); From 168f8a58192f369b7fd1b2f02917d86d11a3ab92 Mon Sep 17 00:00:00 2001 From: Mohammad Ziaur Rahman Date: Fri, 27 Jun 2025 23:27:29 -0500 Subject: [PATCH 2/3] updated --- .gitignore | 1 + browserstack.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 706a798..2d9e686 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ test-results log/ package-lock.json local.log + diff --git a/browserstack.yml b/browserstack.yml index 0a56e1c..fb82992 100644 --- a/browserstack.yml +++ b/browserstack.yml @@ -3,8 +3,8 @@ # ============================= # Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and # BROWSERSTACK_ACCESS_KEY as env variables -userName: mohammadzrahman1 -accessKey: 41vQVzKgxozzAxieu4fQ +userName: username +accessKey: accessky # ====================== # BrowserStack Reporting From 782afcdb05befdbecc4aa04b8201433815f2b72e Mon Sep 17 00:00:00 2001 From: Mohammad Ziaur Rahman Date: Fri, 27 Jun 2025 23:35:22 -0500 Subject: [PATCH 3/3] updated --- browserstack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browserstack.yml b/browserstack.yml index fb82992..ad061d9 100644 --- a/browserstack.yml +++ b/browserstack.yml @@ -3,8 +3,8 @@ # ============================= # Add your BrowserStack userName and accessKey here or set BROWSERSTACK_USERNAME and # BROWSERSTACK_ACCESS_KEY as env variables -userName: username -accessKey: accessky +userName: YOUR_USERNAME +accessKey: YOUR_ACCESS_KEY # ====================== # BrowserStack Reporting