Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium webdriver working in code but not responding in IIS #1125

Closed
VarshaMarkale opened this issue Oct 8, 2015 · 5 comments
Closed

Selenium webdriver working in code but not responding in IIS #1125

VarshaMarkale opened this issue Oct 8, 2015 · 5 comments

Comments

@VarshaMarkale
Copy link

I have used selenium-server-standalone-2.47.1 for C# application.

The below code is working fine in FF,but when deployed on IIS the selenium.open function is
getting hanged.

Please help.

The code is as below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Net;
using System.IO;
using OpenQA.Selenium.IE;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;
using System.Security.Cryptography;
using OpenQA.Selenium.Support.UI;
using Selenium;
using Selenium.Internal.SeleniumEmulation;

protected void btncmn_Click(object sender, EventArgs e)
{

        try
        {   

IWebDriver driver = new FirefoxDriver();

            String baseUrl = "http://www.google.co.in";

     ISelenium selenium = new WebDriverBackedSelenium(driver, baseUrl);


            selenium.Start();


            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromMinutes(30));

            selenium.Open("http://www.google.co.in");



            IWebDriver driverInstance = ((WebDriverBackedSelenium)selenium).UnderlyingWebDriver;

            selenium.Stop();

}
catch(Exception ex)
{

            File.WriteAllText(@"F:\logerr.txt", ex.Message.ToString());
        }

        finally
        {
        }

    }
@gsampath127
Copy link

Can anyone please provide solution for this

@VarshaMarkale
Copy link
Author

I have got the below answer in Selenium group.And I developed win application.

Answer:
Why are you deploying the test on IIS? You do know that doing so means executing Selenium UI tests on the IIS machine under the context of the user account that runs IIS.

There might be an issue with permissions and/or that the IIS user account is not associated to any graphical desktop session, so it will fail or get stuck as you observed.

You are better off just running a batch script, etc. remotely using PSExec.exe to kick off such test. And if you wanted a nice GUI wrapper on top of that, build one as a .NET desktop app rather than web app, which simply calls the script with a process command.

@gsampath127
Copy link

Thanks

But Here my requirement is to do testing of about 1 lakh urls.

So we have to create web app and perform testing based on client urls.

And the web app to deployed in iis.

Main purpose of web app is that we can perform testing from anywhere.

And genereate the reports to Client.
On 01-Dec-2015 10:29 AM, "VarshaMarkale" notifications@github.com wrote:

I have got the below answer in Selenium group.And I developed win
application.

Answer:
Why are you deploying the test on IIS? You do know that doing so means
executing Selenium UI tests on the IIS machine under the context of the
user account that runs IIS.

There might be an issue with permissions and/or that the IIS user account
is not associated to any graphical desktop session, so it will fail or get
stuck as you observed.

You are better off just running a batch script, etc. remotely using
PSExec.exe to kick off such test. And if you wanted a nice GUI wrapper on
top of that, build one as a .NET desktop app rather than web app, which
simply calls the script with a process command.


Reply to this email directly or view it on GitHub
#1125 (comment)
.

@rsangin
Copy link

rsangin commented Oct 25, 2016

@gsampath127 i have the exact same problem.
did you solve that?

@gsampath127
Copy link

We can not run selenium drivers in IIS . Since drivers are limited it's own
servers.so we can achieve this by using window service.

On 25-Oct-2016 3:49 PM, "rsangin" notifications@github.com wrote:

@gsampath127 i have the exact same problem.
did you solve that?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@lock lock bot locked and limited conversation to collaborators Aug 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants