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

0
votes
0answers
9 views

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

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
29k 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 ...
1
vote
2answers
600 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 ...
1
vote
8answers
30k 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....
1
vote
1answer
287 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:...
27
votes
14answers
102k 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....
2
votes
1answer
704 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 ...
1
vote
1answer
33 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
28 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
37k 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\...
1
vote
0answers
13 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-...
1
vote
2answers
580 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 -...
0
votes
2answers
51 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 ...
0
votes
5answers
140 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
19k 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.
0
votes
4answers
136 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()...
12
votes
6answers
16k 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
22k 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 ...
0
votes
1answer
107 views

Select multiple options and selection values will come 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 ...
15
votes
4answers
16k 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
3answers
361 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 ...
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
5k 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?
1
vote
3answers
195 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
50 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);" ...
1
vote
1answer
591 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
0answers
12 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 ...
1
vote
2answers
36 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?
0
votes
1answer
26 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 ...
0
votes
1answer
91 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
680 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
vote
0answers
18 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
13 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
0
votes
1answer
31 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 ...
7
votes
3answers
10k 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 ...
5
votes
1answer
229 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
2answers
46 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="">...
2
votes
3answers
104 views

How To Handle Dynamic Changing IDs In XPath?

Example : //div[@id='post-body-3647323225296998740']/div[1]/form[1]/input[1] In this XPath id "3647323225296998740" Is changing every time when reloading the page. How to handle this type of ...
1
vote
3answers
115 views

How can we generate unique distinct users for parallel tests with selenium?

How can we generate unique distinct users for parallel tests with selenium WebDriver and java or Javascript. Suppose, in google create an account action I have to pass firstname, lastname, username &...
3
votes
7answers
172 views

How to verify images in selenium WebDriver?

WebDriver does not provide direct any function to image verification, but we can verify images by taking two screen shots of whole web page using “TakesScreenshot” webdriver function, one at script ...
0
votes
1answer
44 views

How to validate if PDF is loaded or not in Selenium Webdriver?

I have a link in Website which will redirect to PDF document after clicking I would like to check if PDF is loaded in the browser or not using selenium I do not want to compare the text/content in ...
0
votes
1answer
35 views

Is use of priority in TestNG a good approach? [closed]

I'm assigning priority to each test method in a specific class under my automation project. My senior reviewed the script I wrote and mentioned to me that do not use priority instead use the xml to ...
1
vote
1answer
53 views

Unable to scroll down to bottom of div with data loading dynamically

<div id="findingTblBody" class="tablebody" infinite-scroll-distance="2" infinite-scroll="loadMoreData()" style="width: 819px;"> I want to scroll to bottom of div mentioned above. I am trying ...
0
votes
0answers
15 views

The Automated test can be executed paralleled by Jenkins, how to make a standalone file for it

I am using the maven-surefire-plugin with selenium grid and the test can be executed by Jenkins paralleled. I have using the multi-thread method in the code but that parallel can only be executed from ...
0
votes
0answers
56 views

How to read Data from XML file and compare the Data with Database Tables as an output using Selenium?

I have to test more than 250 feeds which contains of listing data. Hence, the goal is Download feeds file from existing legacy system which is in XML format and then compare the values with New(re-...
3
votes
2answers
117 views

Getting 'org.openqa.selenium.NoSuchElementException' - how to fix?

I'm getting this error: Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element Why am I getting this WebDriver exception and how can I fix it?
8
votes
9answers
19k views

Using Selenium Webdriver with Windows Authentication

I'm attempting to create some selenium tests for a website that requires windows authentication. I got my first test up and running fairly easily, but it pauses as soon as the system prompts for ...
2
votes
3answers
75 views

What do I need to do if dropdown takes more time to populate 1st element from dropdown list?

What do I need to do if drop down take time to populate 1st element from drop down list? Select Cdropdown = new Select(driver.findElement(By.xpath("//select[@id='ClientId']"))); Cdropdown....