Forum Discussion

sridhar249's avatar
sridhar249
Occasional Contributor
6 years ago

Testcomplete: How to set a cookie value in smartbear browser for an android app.

I am testing a android mobile app using Test complete. I am using the smartbear browser on the app for testing the website.    I am looking for a way to set a particular cookie value before i  pr...
  • AlexKaras's avatar
    AlexKaras
    6 years ago

    Hi Sridhar,

     

    Answering your exact question: Cookies are internal functionality of web browsers that is not accessible to regular end-users.

    As you said, even in full-fledged Chrome some third-party proxy/extension/application is required to get access to cookies content during runtime. Obviously, I would not expect that something similar exists for the simplified basic SmartBear browser.

     

    As a side note: Your scenario more looks like unit/integration/API test rather than functional one. I.e. it looks like to me that you are sending web request with the cookie set to some value and expect to receive certain data in response depending on the cookie's value. This is fine for the API test (and can be easily implemented using, say SoapUI tool). But this is not how real human end-user works. (And primary area of TestComplete is to emulate human end-user actions.) In real world, real user, most probably, will have some login procedure that will set his/her role/permissions and set cookie value based on that. This cookie value will be used than by browser for the data requests.

     

    Anyway, if you really need to access/modify cookie values, Fiddler may be an option for you: https://www.telerik.com/blogs/how-to-capture-android-traffic-with-fiddler