Selenium 2 is the second major release of Selenium, an open source framework for testing web applications. A major difference between Selenium 1 and Selenium 2 is the latter's use of WebDriver.

learn more… | top users | synonyms

1
vote
1answer
10 views

How to Detect if Autoit script is failed or not in selenium (java)

I need to detect if current running autoit script is failed or not. I tried to wait for 1 min in the following code, if in this time 1st Autoit script doesn't complete then it will move on to 2nd ...
0
votes
3answers
73 views

Handling Popup using selenium - how to switch back on parent window from child?

So I have to upload a document, and the popup for file explorer loads and my code can find the document I need, but how do I then switch back to my original browser? Here is the code: driver....
2
votes
1answer
646 views

Need help to get drop down in a list (phpunit+selenium2)

I am new in Phpunit and selenium2. Need help to get all the values of drop-down in a list. <select id="month" class="_5dba" title="Month" name="birthday_month" aria-label="Month"> <option ...
2
votes
1answer
309 views

Unable to open the specified URL on a real device while running Selenium tests using ios-driver

I am trying to automate mobile web testing using ios-driver on an iPhone 6 plus (real device). The Safari browser opens but the specified URL (google.com in this case) is not opened (i.e. only "about:...
2
votes
1answer
708 views

Running Selenium webdriver scripts in android device (Samsung galaxy tab)-Portrait mode

I have been stuck in an issue while running selenium webdriver script in android device -Portrait mode. Script is running successfully in landscape mode but when we run the same script in android ...
0
votes
2answers
219 views

Submit button not working in Selenium webdriver

When I launch ChromeDriver or IEDriver and click the submit button (manually and automatically), it does not send the inputs. It works outside of webdriver though, I can click the submit button and ...
0
votes
1answer
85 views

Division not appended on click event in phantomjs

On clicking the link: <a href="#">xxx</a> the below div should be appended to the webpage <div class="desc cloned"> <div class="wrap"> ...
2
votes
2answers
611 views

Unable to open Safari app on iPhone simulator while running Selenium test using ios-driver

I am trying to automate mobile web testing using ios-driver. The safari browser does not open even though the simulator launches. The configuration as shown on terminal by running the command java -...
1
vote
2answers
1k views

ImportError: No module named 'httplib'

I have recently updated selenium Webdriver to 2.38.1 and I am writing scripts using python. When I run the test case I have I get the following error *Traceback (most recent call last): File "C:/...
0
votes
4answers
157 views

Escape key for Safari using Selenium

I am using Selenium webdriver (Java) and ran into a problem. I made the method, public void escape() { Actions action = new Actions(driver); action.sendKeys(Keys.ESCAPE).build()...
1
vote
3answers
10k views

How to use Xpath 'contains()' function to locate a Web element in Selenium Webdriver?

I am a beginner in learning Selenium WebDriver and XPath. I am trying to get the "<td>" Element of the Nested Table which Contains string '7-8-9.' Following is the HTML page code: <!DOCTYPE ...
3
votes
3answers
16k views

"Element is no longer attached to the DOM” StaleElementReferenceException when selecting HTML table row

I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I ...
1
vote
2answers
170 views

How to press CONTROL key & Select multiple values from Excel

What I am trying to do is select multiple options from this example site while holding CTRL http://www.htmlcodetutorial.com/forms/_SELECT_MULTIPLE.html The multiple selection values would come from ...
0
votes
2answers
40 views

How to configure css or xpath for below code

I need to configure xpath or css for selection under red border i.e a name contains "Patient List"
5
votes
4answers
4k views

How do you block Google Analytics from Selenium automated visits?

Basically, we have a javascript integration on client's webpages. We don't have much (or any) control of the deployed environment, hence the only way to test our integration is truly working is using ...
5
votes
3answers
364 views

PHPUnit Selenium2TestCase BadMethodCallException

I have installed selenium-server-standalone-2.33.0.jar, phpUnit, selenium extension for phpUnit. This test runs ok: $this->url('/'); $this->assertEquals('my title',$this->title()); But ...
0
votes
1answer
90 views

AjaxElementLocatorFactory = Implicit or Explicit

I'm looking for solution in page factory to wait. I don't want to use something like Implicit wait, but something like Explicit. I read about AjaxElementLocatorFactory, but I'm not sure that it ...
1
vote
3answers
115 views

Unable to locate element throwing a org.openqa.selenium.NoSuchElementException in TestNG

Am unable to click on element after executing a First test second test showing a org.openqa.selenium.NoSuchElementException . My code Here: public class snapooh { WebDriver driver; @BeforeTest ...
1
vote
3answers
254 views

Unable to select text from dropdown - Gmail.com Month Dropdown

Im also facing the same error. Unable to select Birthday, Gender & Location in gmail signup page. I'm using Selenium Webdriver. Please find the below code for birthday. new Select (driver....
0
votes
3answers
51 views

xpath - element is not located even when I construct the xpath

element is not found //HTML Code <input type="text" maxlength="61" style="width:185px;" value="" name="name73652d80" onblur="fieldTrack(this); "/> input type="text" onblur="fieldTrack(this);" ...
2
votes
1answer
607 views

Unable to run Appium Version 1.3.6-(Ophiuchus) on Yosemite for Testing Android App on real device

These are my settings: My SDK path: -/usr/local/adt-bundle-mac-x86_64-20140702/sdk My APK path -/usr/local/adt-bundle-mac-x86_64-20140702/sdk/platform-tools/Setmore.apk Given Package name, Launch ...
0
votes
1answer
36 views

java + log4j : How to fix “No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies)”

Working with selenium + maven project in eclipse. I am facing below warnings: log4j:WARN No appenders could be found for logger(org.apache.http.client.protocol.RequestAddCookies). log4j:...
1
vote
2answers
46 views

selenium 2.0: Design pattern for projects which doesn't have so many pages

I have been POM design pattern with pagefactory from past ~ 4 years. In current project again I have implemented same pattern, but there are not so many pages infact majority of test cases work on 1 ...
2
votes
1answer
26 views

Got an error while build or clean mavan project-Could not initialize class org.apache.maven.index.ArtifactInfo

Hi All when I am try to build or clean the mavan project I got below error can any help me ? Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'POM-...
0
votes
1answer
96 views

Getting and logging the selenium version used in a groovy project

I'm using Selenium in my Groovy application as a Maven dependency. Now I'm looking for a way to log the used Selenium Version to the console. I tried this: BuildInfo info = new BuildInfo(); def ...
0
votes
2answers
714 views

Selenium - How to get table rows visible in the dialogbox?

In a Selenium Junit test, for a table with 'n' rows in a dialog box of a webpage, I am able to calculate number of rows using Table.size() (Table is a List of elements which finds elements with tag tr)...
-1
votes
1answer
54 views

How to verify text under <P> tag in selenium

I want to Verify text "No results were found for the query:"under tag in selenium how to verify this text how to take xpath for this div class="fl" style="width: 99%;"> Search Results No results ...
5
votes
1answer
236 views

Selenium Grid2 - IOException thrown while closing Closeable.

I am executing my Selenium tests against a Grid server, hosted on a different machine. My grid invocation is (bat file): cd c:\ start java -jar c:\selenium-server-standalone-2.46.0.jar -role hub -...
-1
votes
1answer
66 views

Not able to find the element to click | Selenium Webdriver | Add New User Issue | Getting java.lang.nullpointerexception [closed]

package com.MainExecutionforWordpress; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import com.AD.Wordpress.Login....
4
votes
7answers
30k views

Take screen shots using selenium webdriver

How to take screen shot on both test cases "Positive and Negative" results. NOTE: Currently, iam working in selenium webdriver (junit) and i didnt have an idea about how to code for adding methods to ...
2
votes
8answers
32k views

Selenium test case fails due to page load time

I run nearly 30-40 test cases twice a day. And everytime some test case fails due to page load time. Infact i have explicitly mentioned Thread.sleep("2000"); wherever i feel it takes more time to load....
27
votes
14answers
105k views

How to download a file using Selenium's WebDriver?

Basically I want to at least check that a download-able file exists / download link works and preferably get stuff like the file size too. Here's an example: link = self.browser....
1
vote
1answer
59 views

Selenium 2 Webdriver: Persistent cookie browser restart

I test a OAuth 2 Login page. It allows me to remember my login. This is done with a persistant cookie. Now I want to test if this cookie remains present after a browser restart which is its intent: .....
0
votes
0answers
30 views

Store result file dynamically

I'm using selenium selenium-server-standalone-2.53.0.jar file. java -jar selenium-server-standalone-2.53.0.jar -userExtensions user-extensions.js -trustAllSSLCertificates -htmlsuite "*firefox" "https:...
12
votes
6answers
39k views

Selenium: reuse existing browser session, instead of opening new windows?

This has been asked a million times on the web, but there's no clear cut answer. I tried "-browserSessionReuse" today without any luck; my tests keep spawning new browser windows. X:\QA\Automation\...
0
votes
5answers
296 views

How to get entered text from textbox when value is empty in selenium using java?

Just I am trying to get entered text from the text field when value is empty. Below is my HTML: <input type="text" style="width: 203px" value="" maxlength="32" name="firstName"/> I tried ...
5
votes
6answers
20k views

Desktop Application testing using selenium

Is it possible to test desktop applications using selenium? Suppose we have a simple application like gtalk. A desktop application, can we automate that application with selenium.
12
votes
6answers
17k views

Which locator do you use with Selenium: CSS or XPath?

I have heard that, when using Selenium, the CSS Locator has better performance than the XPath Locator. Which Locator do you use in your tests? Have you seen a great performance improvement when ...
13
votes
11answers
23k views

What is a good website to hack around using Selenium?

I want to learn Selenium, but I don't know what to code. Sure, I can throw Google some queries, I can fill out some forms, press buttons, find divs and links, etc. But I think this stuff is pretty ...
15
votes
4answers
17k views

Is there a captureNetworkTraffic implementation in Selenium 2 via webdriver?

If yes, how is it called, or where can I find more info about it? (I'm not talking about using WebDriverBackend.) If not, what alternatives are there?
5
votes
2answers
3k views

How and where to store dynamic result/data using webdriver java

I want to know "How and where to store dynamic (Search results) result/data", I am getting the results and not sure what to do next. Also, after saving these results I want to use this in another ...
0
votes
2answers
6k views

How to handle sub child windows(more than 3) using Selenium Web Driver with Java

I am using Selenium Webdriver with Java, and I need help handling sub child windows. I have to handle four child windows. Main window- Child window- Grand child - (to reach 5 child windows) I ...
0
votes
2answers
2k views

Working of pageloadTimeout in selenium webdriver?

How does pageload timeout in selenium webdriver work? Once set using driver.manage().timeouts().pageLoadTimeout() what is lifetime of the timeout?
0
votes
0answers
22 views

How to create chromedrive.exe from chrome driver source code?

am trying to create chromedriver.exe from the chrome driver source code but i didn't found any correct solution to create this.
0
votes
4answers
2k views

How to include passed assertions in the Test NG test result report?

I use Selenium webdriver 2 with Test-NG. Test-NG gives a nice report when an assertion fails. The customer wishes to see the same report in the case where an assertion passes. Is it possible to do ...
2
votes
2answers
50 views

What is the hierarchy to use for finding elements - ID, class, name, xpath?

What is the hierarchy to use 'find element' by ID, class, or xpath and so on. Which is preferred over which? For some elements class is being used - is that recommended?
1
vote
0answers
21 views

How to Verify link using dataprovider [closed]

I want to verify hyperlink which in under the red border using data provider method. print them 1) User can click on hyperlink 2) Using data provider print the text into the console.
0
votes
0answers
14 views

Verify hyperlink using dataprovider [duplicate]

I want to verify given hyperlink highlighted in redborder using dataprovider How to do it ,please let me know
7
votes
3answers
11k views

Selenium form input sendKeys doesn't always work under IE

We're trying to use Selenium 2.0b3 to verify behavior of a Java web site we've recently acquired from a third party. The site often uses AJAX to plop HTML replacements onto the page. Internet ...
-1
votes
2answers
47 views

How to find the element for below code in WebDriver?

I am using Selenium Webdriver in C#. I am trying to find the element for below given Angular code. "<div class="ViewMenu" ng-class="{'selectedViewMenu':SearchObj.param.View=='Videos'}" style="">...