# Open Test Browser incorrect Arguments in robot file

**URL:** <https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560>\
**Category:** Robot Framework\
**Created:** [2 March 2026 18:17 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560 "2026-03-02T18:17:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubdev89](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dubdev89](https://forum.robotframework.org/u/dubdev89)\
**Post date:** [2 March 2026 18:17 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/1 "2026-03-02T18:17:30Z")

</div>

I may have missed something completely basic in my setup.

We have a cumulusci project, where we’re building robot tests utilising SalesforcePlaywright.robot. I’m trying to test the Browser functionality using Open Test Browser but various attempts at using it are returning errors.

```python
***Settings***
Resource cumulusci/robotframework/SalesforcePlaywright.robot

***Tasks***
Open Custom Browser
    Open Test Browser

```

```python
Error: browser.newContext: viewport.width: expected integer, got string

```

I have tried a few others

```python
***Settings***
Resource cumulusci/robotframework/SalesforcePlaywright.robot

***Tasks***
Open Custom Browser
    Open Test Browser useralias=TestUser

```

```python
Error: browser.newContext: viewport.width: expected integer, got string

```

```python
***Settings***
Resource cumulusci/robotframework/SalesforcePlaywright.robot

***Tasks***
Open Custom Browser
    Open Test Browser size=1920x1080

```

```python
Error: browser.newContext: viewport.width: expected integer, got string

```

Most examples I’ve seen, are using it with no arguments. I’m wondering is there something obvious I’ve missed? I’ve been troubleshooting the configuration and re-installed etc.

Thanks

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [2 March 2026 18:19 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/2 "2026-03-02T18:19:30Z")

</div>

Looks like issue on (cumulusci) their side.

[CumulusCI/cumulusci/robotframework/SalesforcePlaywright.py at main · SFDO-Tooling/CumulusCI · GitHub](https://github.com/SFDO-Tooling/CumulusCI/blob/main/cumulusci/robotframework/SalesforcePlaywright.py#L110) ← takes strings and passes them forward without converting to it int..

File a bug, nothing to do with browser library..

---

<div class="post-metadata">

**Author:** ![dubdev89](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dubdev89](https://forum.robotframework.org/u/dubdev89)\
**Post date:** [2 March 2026 19:24 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/3 "2026-03-02T19:24:15Z")

</div>

Thanks. I have just done that. I think I can utilise New Browser for now but will need to specify the login/url credentials whereas Open Test Browser takes care of that for you?

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [3 March 2026 06:50 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/4 "2026-03-03T06:50:19Z")

</div>

I just googled your error message and i have not even seen this project before so no idea. But why wouldn’t you be able to do that on plain browser ? Just check the linked python code and model your RF in same fashion..

---

<div class="post-metadata">

**Author:** ![dubdev89](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dubdev89](https://forum.robotframework.org/u/dubdev89)\
**Post date:** [5 March 2026 10:12 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/5 "2026-03-05T10:12:29Z")

</div>

Apologies if I’m missing something, quite new to rf so figuring best approaches. will review

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [5 March 2026 10:33 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/6 "2026-03-05T10:33:53Z")

</div>

you mentioned “you tried to fix it” in the actual issue. Stuff like that is not very helpful unless you share the code ..

Python code in the linked file is like this:

```python
        context_id = self.browser.new_context(
            viewport={"width": width, "height": height}, recordVideo=record_video
        )

```

and it should be like this:

```python
        context_id = self.browser.new_context(
            viewport={"width": int(width), "height": int(height)}, recordVideo=record_video
        )

```

---

<div class="post-metadata">

**Author:** ![dubdev89](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dubdev89](https://forum.robotframework.org/u/dubdev89)\
**Post date:** [5 March 2026 10:45 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/7 "2026-03-05T10:45:39Z")

</div>

> [@rasjani](#):
>
> ```python
> context_id = self.browser.new_context(
> viewport={"width": int(width), "height": int(height)}, recordVideo=record_video
> )
> 
> ```

Thanks @rasjani I had tried multiple scenarios of trying to fix it which was why I didn’t share but I take your point. I have tried once more using your example for context\_id with this in my test:

> \*\*\* Settings \*\*\*  
> Resource cumulusci/robotframework/SalesforcePlaywright.robot
> 
> \*\*\* Tasks \*\*\*  
> Open Custom Browser  
> Open Test Browser

and I’m still receiving: Error: browser.newContext: viewport.width: expected integer, got string

I’m wondering is there some issue in my configuration.

Thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [5 March 2026 10:48 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/8 "2026-03-05T10:48:48Z")

</div>

And you edited the installed python file and not running it in CI ?

---

<div class="post-metadata">

**Author:** ![dubdev89](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dubdev89](https://forum.robotframework.org/u/dubdev89)\
**Post date:** [5 March 2026 11:29 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/9 "2026-03-05T11:29:18Z")

</div>

It’s working now locally with your suggested fix. I had a bit of nightmare, I have multiple virtual environments and they are similarly named. I was editing the wrong one and losing my mind as to why I couldn’t see any logging inforrmation. Thank you @rasjani

This is a bug on CCI side right? And what is the approach when I look to use it in my CI?

Thanks

---

<div class="post-metadata">

**Author:** ![rasjani](https://avatars.discourse-cdn.com/v4/letter/r/858c86/32.png) [@rasjani](https://forum.robotframework.org/u/rasjani)\
**Post date:** [5 March 2026 11:45 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/10 "2026-03-05T11:45:49Z")

</div>

> [@dubdev89](#):
>
> This is a bug on CCI side right?

Yes, thats why I told to file a bug to their issue tracker.

> [@dubdev89](#):
>
> what is the approach when I look to use it in my CI?

1. wait for the fix
2. Submit the fix yourself - probably needs that you sign their CLA too and then, then wait for the fix to be released
3. “Fork their project”, implement the fix in the fork, push the fork to somewhere where your CI can fetch it and use that fork until the fix is provided by CCI
4. Since the change is only essentially oneline fix:
  1. make a diff with your fix
  2. apply the fix in your ci pipeline against the installed cumulusci version _before_ running robot

---

<div class="post-metadata">

**Author:** ![dubdev89](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dubdev89](https://forum.robotframework.org/u/dubdev89)\
**Post date:** [5 March 2026 11:50 UTC](https://forum.robotframework.org/t/open-test-browser-incorrect-arguments-in-robot-file/9560/11 "2026-03-05T11:50:34Z")

</div>

Thank you so much @rasjani
