Tagged Questions
40
votes
13answers
63k views
Selenium c# Webdriver: Wait Until Element is Present
I want to make sure that an element is present before the webdriver starts doing stuff.
I'm trying to get something like this to work:
WebDriverWait wait = new WebDriverWait(driver, new ...
5
votes
1answer
3k views
Get chrome's console log
I want to build an automation testing, so I have to know the errors that appear in the console of chrome.
there is an option to get the error lines that appear in the console?
In order to see the ...
14
votes
8answers
9k views
Run Selenium tests in multiple browsers one after another from C# NUnit
I'm looking for the recommended/nicest way to make Selenium tests execute in several browsers one after another. The website I'm testing isn't big, so I don't need a parallel solution yet.
I have the ...
2
votes
2answers
4k views
How to set Chrome preferences using Selenium Webdriver .NET binding?
Here is what I'm using, user agent can be successfully set, while download preferences cannot.
Windows 7, Chrome 26, Selenium-dotnet-2.31.2, chromedriver_win_26.0.1383.0
ChromeOptions chromeOptions ...
20
votes
4answers
15k views
Best way to take screenshots of tests in Selenium 2?
So I need a way to take screenshots of my functional tests. Right now I'm using Selenium 2 with C# bindings. I pretty much want to take a screenshot at the end of the test to make sure the desired ...
36
votes
19answers
47k views
How do I maximize the browser window in Selenium WebDriver (Selenium 2) using C#?
Is there a way to maximize the browser window using WebDriver (Selenium 2) with C#?
53
votes
3answers
11k views
What would be an alternate to [SetUp] and [TearDown] in MSTest?
When I use MSTest FrameWork, and copy the code that Selenium IDE generated for me, MSTest doesn't recognize TearDown and Setup. What is the alternative to this?
3
votes
2answers
2k views
Selenium Webdriver PhantomJS C# always opens a cmd window
I am trying to use PhantomJS with Selenium Webdriver in C#. Following is my code:
IWebDriver driver = new PhantomJSDriver();
driver.Navigate().GoToUrl("http://www.google.com");
...
12
votes
3answers
4k views
Has anyone found a way to run C# Selenium RC tests in parallel?
Has anyone found a way to run Selenium RC / Selenium Grid tests, written in C# in parallel?
I've currently got a sizable test suite written using Selenium RC's C# driver. Running the entire test ...
8
votes
7answers
6k views
How can I run NUnit(Selenium Grid) tests in parallel?
My current project uses NUnit for unit tests and to drive UATs written with Selenium. Developers normally run tests using ReSharper's test runner in VS.Net 2003 and our build box kicks them off via ...
10
votes
3answers
6k views
Why is Selenium InternetExplorerDriver Webdriver very slow in debug mode (visual studio 2010 and IE9)
I'm using the example code from the SeleniumHq site - but in debug mode the performance is awful.
In release mode the entire test takes about 6 seconds (including launching and closing IE)
In Debug ...
8
votes
3answers
8k views
Selenium WebDriver C# Full Website Screenshots With ChromeDriver and FirefoxDriver
When I take screenshots with ChromeDriver I get screens with the size of my viewport.
When I take screenshots with FirefoxDriver I get what I want, which is a full screen print of a website.
...
5
votes
2answers
9k views
Finding an element by partial id with Selenium in C#
I am trying to locate an element with a dynamically generated id. The last part of the string is constant ("ReportViewer_fixedTable"), so I can use that to locate the element. I have tried to use ...
9
votes
5answers
7k views
How to connect to an already open browser?
I would really appreciate a guide on how to connect to an already open browser using Selenium Webdriver via C#.
This issue eats around 30% of my script development time!
5
votes
2answers
5k views
Open firefox window in selenium with firefox addons loaded?
when I run my test in selenium, the newly opened firefox window is opened without my installed addons like xpathchecker.
Is it possible to setup selenium so that it will use firefox with installed ...
7
votes
4answers
6k views
Selenium Fails with Chrome Version 32.0.1700.72 m
Chrome automatically updated to "Version 32.0.1700.72 m" for me this morning (1/8/2014) and now all my automated tests will not run--they fail with "System.InvalidOperationException: ...
2
votes
2answers
2k views
Disable images in Selenium Google ChromeDriver
How does one disable images in Google chrome when using it through Selenium and c#?
I've attempted 6 ways and none worked. I've even tried the answer on this StackOverflow question, however I think ...
1
vote
3answers
2k views
Getting ALL attributes from an IWebElement with Selenium WebDriver
I want to extract some information from the DOM with Selenium. I'm using the C# WebDriver.
Looking at the IWebElement interface you can easily extract a given attribute. However, I would like to ...
1
vote
3answers
764 views
Untrusted SSL Certificates in Firefox Using WebDriver and C#
UPDATE: i upgrade to Selenium 2.37 but still having the same problem!!
LATEST EDIT: still does not work after defining the pref (see below)
//some more prefs:
...
3
votes
3answers
2k views
Selenium WebDriver - No driver is working for me
I'm trying to get Selenium tests running. I'm using C#. I'm having a problem with every driver I tried.
Chrome
var options = new OpenQA.Selenium.Chrome.ChromeOptions();
options.BinaryLocation = ...
1
vote
2answers
670 views
How to find ExtJS elements with dynamic id
I am working with Selenium and need to get the ID of a control but the ID is dynamic and I can't get it.
<em id="button-1122-btnWrap">
<button id="button-1122-btnEl" class="x-btn-center" ...
1
vote
1answer
1k views
Disable images in Selenium ChromeDriver
Trying to disable images loading in ChromeDriver. I'm using the following code, however it's still loading the images. Any suggestions?
DesiredCapabilities capabilities = ...
0
votes
1answer
81 views
Can we set the speed of the webdriver?
Can we set the speed of the webdriver like we use ISelenium.SetSpeed(String). Can we use IWebdriver.SetSpeed(String)?
I am writing code in c#.
0
votes
1answer
96 views
Selenium to click on an app name in a filter tool
I have another requirement like this in my c# selenium application. Since there are so many content in my webpage table, it will be quite nice to sort it based on the app name. I have content like ...
0
votes
2answers
659 views
Using C# with selenium and cleditor
I want to be able to set the body for a cleditor text field using selenium in c#, but this process seems to be very difficult. Can anyone explain it like i'm 4 years old?
17
votes
6answers
8k views
Selenium WebDriver throws Timeout exceptions sporadically
Using selenium for ui tests on our project. We are running the newest version 2.30.0.
We use Firefox WebDriver and are running Firefox 19.0.
Generally said the ui test works local and even server ...
1
vote
2answers
5k views
How to set Firefox Profile: Selenium RC, .Net Client Driver?
I'm using Selenium RC + .Net Client Driver. I've created a Firefox profile in my c:\selenium\ directory. Here's my code:
Dim MySelenium As ISelenium = Nothing
MySelenium = New ...
8
votes
4answers
13k views
Selenium WebDriver - How to set Page Load Timeout using C#
I am using Selenium 2.20 WebDriver to create and manage a firefox browser with C#. To visit a page, i use the following code, setting the driver timeouts before visiting the URL:
...
5
votes
1answer
2k views
Best Practices for modularizing Selenium RC test scripts
I am creating Selenium RC test scripts in Visual Studio (C#). I am
struggling with re-factoring the tests; all my tests are in a single
file. I would appreciate any input and/or pointers to websites, ...
11
votes
3answers
8k views
Selenium error: No response from server for url http://localhost:7055
I'm using Selenium, C#, NUnit to write tests, sometimes I get this error: OpenQA.Selenium.WebDriverException : No response from server for url ...
5
votes
2answers
9k views
Using Selenium 2's IWebDriver to interact with elements on the page
I'm using Selenium's IWebDriver to write Unit Tests in C#.
Such is an example:
IWebDriver defaultDriver = new InternetExplorerDriver();
var ddl = driver.FindElements(By.TagName("select"));
The ...
4
votes
4answers
5k views
Test if an element is focused using Selenium Webdriver
I'm really surprised I can't find references on the internet to testing for element focus using Selenium Webdriver.
I'm wanting to check when when a form submission is attempted with a mandatory ...
3
votes
3answers
2k views
Selenium c# accept confirm box
I have written an nUnit test using selenium in c#.
All was going well until I have to confirm a JS confirm box.
here is the code I am using:
this.driver.FindElement(By.Id("submitButton")).Click();
...
3
votes
2answers
4k views
Selenium Webdriver C# Sendkeys (Keys.Arrowdown)
I'm trying to do do an arrow using Selenium Webdriver/C# compile but when I try to compile I get this error:
'Keys' is an ambiguous reference between 'OpenQA.Selenium.Keys' and ...
2
votes
2answers
8k views
Selenium C# Webdriver FindElements(By.LinkText) RegEx?
Hi I am wandering is it possible to find links on a webpage by there text if it is in such a pattern like A-ZNN:NN:NN:NN
N being 0-9
I think used Regex in PHP to do this to turn text into links but ...
7
votes
5answers
12k views
Using a specific firefox profile in selenium 2 webdriver in C#
I am trying to use a profile I already have set up for firefox with selenium 2 but there is no documentation for C#. The code I have attempted is as follows:
FirefoxProfileManager profileManager = ...
6
votes
1answer
2k views
Alert Handling - Selenium WebDriver/ Selenium RC 2.18.0 - Exception
My automation test software for a web application runs on IE, Firefox, Chrome and Safari, and is written using C# and Selenium WebDriver (IE, Firefox, Chrome), Selenium RC (Safari).
A new error ...
5
votes
3answers
3k views
Selenium Error - The HTTP request to the remote WebDriver timed out after 60 seconds
I've been using Selenium for a number of months, which we're using to automate some of our internal testing processes. The scripts have been passing fine. I've recently upgraded to C# 2.40.0 webdriver ...
4
votes
3answers
13k views
Selenium 2.0 WebDriver Advcanced Interactions DoubleClick Help (c#)
So within my selenium regression tests, I've been trying to double click on a calendar to make a new appt. I have attempted to use the doubleClick(); method within the advanceduserinteractions ...
4
votes
2answers
7k views
How do I use Selenium in C#?
Selenium.
I downloaded the C# drivers and the IDE. I managed to record some actiona and successfully run them from the IDE, but now I want to do that using C#. I added all relevant DLLs (Firefox) to ...
4
votes
1answer
5k views
Problems with data driven testing in MSTest
I am trying to get data driven testing to work in C# with MSTest/Selenium.
Here is a sample of some of my code trying to set it up:
[TestClass]
public class NewTest
{
private ISelenium selenium;
...
4
votes
2answers
691 views
trouble executing Selenium python unittests in C# with ScriptEngine (.NET 3.5)
first time poster.
I'm turning to my first question on stack overflow because I've found little resources in trying to find an answer. I'm looking to execute Selenium python tests from a C# ...
3
votes
1answer
1k views
C# Selenium webdriver JavaScript errors logging
I'm testing with Selenium webdriver using C#.
How can I log all JavaScript errors that could happen through my tests?
3
votes
3answers
1k views
What would be a walkaround for JavaScript alerts that are generated in a page's onload() using Selenium?
I am automating a form page using Selenium RC (C#). After I click 'Submit' button, I get an alert 'Records Edited Successfully!'. The title of this alert box is 'The page at http://www.******.com ...
2
votes
2answers
3k views
FindBy annotation used to find a list of WebElements
In java I use code like this to grab a list of WebElements with the same identifier:
@FindBy(how = How.CLASS_NAME, using = "name")
private List<WebElement> names;
Now, I'm using c# and I'm ...
2
votes
1answer
1k views
selenium webdriver C# multithreading
Does Selenium WebDriver support multithreading well?
I'm trying to use it with several windows opened 2-4, and it looks like browser window (Firefox) gets freezed sometimes.
When one thread starts:
...
2
votes
3answers
2k views
Headless browser like selenium but which does not open the actual browser
I built simple application in C# that is posting new link to google+ account, however it is starting the actual browser itself. I'm fine with C#, Python, PHP languages, maybe even something else.
I ...
1
vote
1answer
4k views
Selenium c#: How to launch Internet Explorer driver in a specific version (IE8 for example)
In java it is possible to set an IE version for internet explorer driver by passing Desired Capabilities. That doesn't work in C#.
I would expect it to look something like:
DesiredCapabilities ...
1
vote
1answer
503 views
C# Selenium: GetXpathCount shows 0
The following is a code snippet from the website I'm testing:
<table width="100%" cellspacing="3" cellpadding="0" border="0">
<tbody>
<tr>
<td width="2%" valign="top" ...
0
votes
1answer
29 views
Selenium C # - Opening a FireFox browser through Selenium Different from doing it Manually
I have noticed when opening a FireFox browser using Selenium I can log into into a website (using the line of code below). But when copying and pasting the exact url into a FireFox browser I am ...