Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Using RemoteWebDriver
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam  
View profile  
 More options Jul 3 2012, 7:51 am
From: Adam <afin...@gmail.com>
Date: Tue, 3 Jul 2012 04:51:50 -0700 (PDT)
Local: Tues, Jul 3 2012 7:51 am
Subject: Using RemoteWebDriver

Hey Adrian,

I think I have come across a problem with extending SeleniumWebDriver I
have a couple of solutions too.

So heres what I'm running:

 public class AdamsWebdriver :SeleniumWebDriver
    {

        public AdamsWebdriver(Browser browser)
            : base(new RemoteWebDriver(new Uri(@"http://10.2.2.48:4444/wd/hub"), new DesiredCapabilities("iexplore", "9", Platform.CurrentPlatform) { IsJavaScriptEnabled = true }))
        {          
        }

        protected AdamsWebdriver(IWebDriver webDriver)
            : base(new RemoteWebDriver(new Uri(@"http://10.2.2.48:4444/wd/hub"), new DesiredCapabilities("iexplore", "9", Platform.CurrentPlatform) { IsJavaScriptEnabled = true }))
        {
        }

}

Excuse the silly name, I was jsut testing.  So running this code gives an
exception as it doesn't set _browser.  I can't set _browser and using:

 protected new bool NoJavascript
        {
            get { return false; }
        }

does not work because it references the one inside SelniumWebDriver.  I
guess there are a couple of options:

1) Make NoJavascript virtual
2) make _browser overridable

If I am using this incorrectly please let me know but to me it looks like
the codes evolved to include browser and this doesn't work with overriding
the driver.

Thanks

Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Longley  
View profile  
 More options Jul 3 2012, 9:43 am
From: Adrian Longley <adrianlong...@gmail.com>
Date: Tue, 3 Jul 2012 14:43:16 +0100
Local: Tues, Jul 3 2012 9:43 am
Subject: Re: Using RemoteWebDriver

On 3 Jul 2012, at 12:51, Adam wrote:

No you are quite right. It is a bug.

What was missing was the browser should have been received by the base constructor and set there so with the fix your code will now look like this:

>  public class AdamsWebdriver : SeleniumWebDriver
>     {    
>         public AdamsWebdriver(Browser browser)
>             : base(new RemoteWebDriver(new Uri(@"http://10.2.2.48:4444/wd/hub"), new DesiredCapabilities("iexplore", "9", Platform.CurrentPlatform) { IsJavaScriptEnabled = true }), browser)
>         {          
>         }
> }

This also gives you the option of replacing the configured browser with your own at this point. Since you are fixing it to IE I suppose it might be a good idea to just hard code it to Browser.InternetExplorer in this case.

You never needed the second constructor in any case.

I've opened an issue on github for this and I'll push out a new Coypu soon to fix it.

Thanks for your help
Adrian


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adrian Longley  
View profile  
 More options Jul 3 2012, 10:09 am
From: Adrian Longley <adrianlong...@gmail.com>
Date: Tue, 3 Jul 2012 15:09:14 +0100
Local: Tues, Jul 3 2012 10:09 am
Subject: Re: Using RemoteWebDriver

OK, this is fixed in Coypu 0.10.1 which is available from nuget.org now.

Cheers,
Adrian

On 3 Jul 2012, at 14:43, Adrian Longley wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam  
View profile  
 More options Jul 3 2012, 12:14 pm
From: Adam <afin...@gmail.com>
Date: Tue, 3 Jul 2012 09:14:27 -0700 (PDT)
Local: Tues, Jul 3 2012 12:14 pm
Subject: Re: Using RemoteWebDriver

Hey Adrian,

That is perfect.  Thanks for your speedy response again.  Aside from that
getting it to run on a remote machine was relatively painless.  

Regards

Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
circa.1741  
View profile  
 More options Mar 26, 6:48 pm
From: "circa.1741" <circa.1...@gmail.com>
Date: Tue, 26 Mar 2013 15:48:50 -0700 (PDT)
Local: Tues, Mar 26 2013 6:48 pm
Subject: Re: Using RemoteWebDriver

May I ask if this is how to use coypu with grid 2?  I am trying to do just
that and am looking for some reference.  Thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »