Please help me.. I want to run ie webdriver as different user. Is it possible in selenium..

53 views
Skip to first unread message

theju...@gmail.com

unread,
Jun 12, 2018, 2:40:10 AM6/12/18
to Selenium Users
Am doing an API testing where I have to test with a different credentials.. so when the webdriver opens it should ask me the login credentials.. please someone help me with this

Cassian Raja Thomas

unread,
Jun 12, 2018, 5:04:56 AM6/12/18
to seleniu...@googlegroups.com
As you are doing API testing, all you have to do is pass the login credentials as part of the request. 
Get a Basic authentication token string and pass that as the header value in the request. This will authenticate the user for the API

Thanks & Regards,
Cassian Raja .T

On Tue, Jun 12, 2018 at 10:17 AM, <theju...@gmail.com> wrote:
Am doing an API testing where I have to test with a different credentials.. so when the webdriver opens it should ask me the login credentials.. please someone help me with this

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/b5135fa3-94a9-4e67-943c-1d82c25906a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

theju jeevan

unread,
Jun 12, 2018, 5:17:05 AM6/12/18
to seleniu...@googlegroups.com
Can you send me sample code. To get the basic authentication token 

On 12-Jun-2018 2:34 PM, "Cassian Raja Thomas" <rajac...@gmail.com> wrote:
As you are doing API testing, all you have to do is pass the login credentials as part of the request. 
Get a Basic authentication token string and pass that as the header value in the request. This will authenticate the user for the API

Thanks & Regards,
Cassian Raja .T

On Tue, Jun 12, 2018 at 10:17 AM, <theju...@gmail.com> wrote:
Am doing an API testing where I have to test with a different credentials.. so when the webdriver opens it should ask me the login credentials.. please someone help me with this

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

ankit gupta

unread,
Jun 12, 2018, 9:35:32 AM6/12/18
to Selenium Users
Your login API return the access-token in the response.

Cassian Raja Thomas

unread,
Jun 12, 2018, 9:38:02 AM6/12/18
to seleniu...@googlegroups.com
First hit the login or authentication api with your username and password. The response header will have the session token which you can use for further API calls.

Thanks & Regards,
Cassian Raja .T

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.

theju...@gmail.com

unread,
Jun 15, 2018, 1:45:40 AM6/15/18
to Selenium Users
I need to embed the domain username and password in the url.. but I googled n got to know that is won't support this..

I have tried the below command to run ie as different user..

Runtime.getruntime().exec("cmd.exe /c start runas /env /user:pibranches\\username \"path to the webdriver\"")
It's prompting me for the password ..but
Am getting path not correct error in CMD prompt.


Can you please help me..

Reply all
Reply to author
Forward
0 new messages