# Using Browser, how to continue testing a page in another test case (same suite test)

**URL:** <https://forum.robotframework.org/t/using-browser-how-to-continue-testing-a-page-in-another-test-case-same-suite-test/6337>\
**Category:** Browser\
**Created:** [11 October 2023 09:17 UTC](https://forum.robotframework.org/t/using-browser-how-to-continue-testing-a-page-in-another-test-case-same-suite-test/6337 "2023-10-11T09:17:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@Alexandre](https://forum.robotframework.org/u/Alexandre)\
**Post date:** [11 October 2023 09:17 UTC](https://forum.robotframework.org/t/using-browser-how-to-continue-testing-a-page-in-another-test-case-same-suite-test/6337/1 "2023-10-11T09:17:52Z")

</div>

Hi !

I am new with Browser Library, I am trying to test a web app. I create a test case where I manage to create a browser, context and page and I manage to do what I want.

But I want to continue with another test case (testing another feature of this web app) but I get an error which say ‘‘Can not find Active Page’’.

Here is my code :  
\*\*\* Test Cases \*\*\*

Step 1  
New Browser chromium ${False} slowMo=500ms  
New Context baseURL=[https://192.168.1.3/#/login](https://192.168.1.3/#/login) ignoreHTTPSErrors=${True}  
New Page  
Go To [https://192.168.1.3/#/login](https://192.168.1.3/#/login)  
Take Screenshot  
${source}= Get Page Source  
log ${source}  
Type Text xpath=//input[@name=“username”] Username  
Type Text xpath=//input[@name=“password”] Password  
click xpath=//button[contains(text(),“Login”)]  
Click xpath=//button[@aria-label=“Close”]

```
Take Screenshot
Get Page Source
pause execution

```

Step 2  
Click xpath=//span[contains(text(),“Settings”)]

I also tried adding in step 2 ‘‘Go To [https://192.168.1.3/#/dashboard](https://192.168.1.3/#/dashboard)’’  
Also, Switch to browser, switch to context and switch to page (having stored the ids before) like this :

step 1  
${BrowserId}= New Browser chromium ${False} slowMo=500ms  
Set Suite Variable ${BrowserId\_AllTests} ${BrowserId}  
${ContextId}= New Context baseURL=https://${LiteServer\_Ip}/#/login ignoreHTTPSErrors=${True}  
Set Suite Variable ${ContextId\_AllTests} ${ContextId}  
${PageId}= New Page  
Set Suite Variable ${PageId\_AllTests} ${PageId}  
Go To https://${LiteServer\_Ip}/#/login

step 2  
Switch Browser ${BrowserId\_AllTests}  
Switch Context ${ContextId\_AllTests} ${BrowserId\_AllTests}  
Switch Page ${PageId\_AllTests} ${ContextId\_AllTests} ${BrowserId\_AllTests}

But without success.

Is there something I miss? Or I don’t understand?

Thanks in advance !  
Best regards,

---

<div class="post-metadata">

**Author:** ![Alexandre](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@Alexandre](https://forum.robotframework.org/u/Alexandre)\
**Post date:** [11 October 2023 12:41 UTC](https://forum.robotframework.org/t/using-browser-how-to-continue-testing-a-page-in-another-test-case-same-suite-test/6337/2 "2023-10-11T12:41:14Z")

</div>

Alright My bad, I have not read enough carefully the documentation…  
There is the auto\_closing\_level argument of the browser library that is possible to set to Test, Suite or Manual.

Thanks,

---

<div class="post-metadata">

**Author:** ![kora-rider](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/kora-rider/32/3139_2.png) [@kora-rider](https://forum.robotframework.org/u/kora-rider)\
**Post date:** [8 November 2023 16:32 UTC](https://forum.robotframework.org/t/using-browser-how-to-continue-testing-a-page-in-another-test-case-same-suite-test/6337/3 "2023-11-08T16:32:21Z")

</div>

I am using the argument auto\_closing\_level=MANUAL and I still want to use hook Suite Setup but I am getting this error:  
Parent suite setup failed:  
ValueError: Setting for test/task can not be set on suite level}

Is there any other solution to use the argument auto\_closing\_level=MANUAL and Suite Setup hook?
