Questions tagged [selenium2]

Use for questions about Selenium 2. 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.

Filter by
Sorted by
Tagged with
3
votes
2answers
21k views

How to call a method from one class to another class when both are TestNG classes

I have 2 TestNG classes which are: ProductCanvas package objectRepo; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium....
2
votes
0answers
168 views

How do I access fields within Braintree's Hosted Fields' iframes using selenium

On my application payment gateway is Braintree, I need to automate it and face some difficulties when i am automating it, major problem is I cannot send credit cart details using x path, I research ...
1
vote
3answers
13k views

Locator has 3 matching nodes. How to get Selenium identify the required element?

I'm new to Selenium WebDriver. I'm trying to automate a search function on a particular page. There are a search input box and a search button (actually, it is a search icon) next to it. I'm able to ...
0
votes
1answer
1k views

Unable to call method in main class

I am trying to call a method in the main function using selenium. However, I am not able to do so. Getting null pointer error. The subclass drinks should be called in the main class coop_main. Could ...
7
votes
2answers
4k views

How to get max character count for input fields with selenium webdriver

How to get the maximum allowed character in any text box eg.user name, email address, in selenium webdriver ?
-2
votes
4answers
946 views

Unable to customize XPath containing span

I want to select all the products having rating 4.5 and add to the cart. However, I am not able to customize the XPath. I tried the below XPath: //div[@class='product-item__rating']/span This ...
2
votes
1answer
7k views

How to locate element inside <form> <table> element </table> </form>?

I want to locate element TableHeader which is inside a form table, it has the following page structure: <form> <table id="topNavigation" cellspacing="0" cellpadding="0" border="0" width="...
4
votes
4answers
7k views

Find first IMG element using XPATH

I am trying to find first fridge IMG element in a e-Commerce page but I could not find it alone, It's identifying all Images under First DIV.. Please share you thoughts I tried below XPATH, is there ...
-1
votes
1answer
517 views

Selecting available Usernames while creating Gmail Account using Selenium

How to select from available usernames while creating Gmail account using Selenium when the username was chosen is already taken? driver.get("https://accounts.google.com/SignUp?service=mail&...
0
votes
1answer
480 views

Not able to select flipkart filter in selenium

I am trying to select the filter sub-section ( Left panel) in flip kart page. I am trying to expand "TYPE" section but I could not do it... WebDriver driver = new ChromeDriver(); driver.get("https:...
0
votes
2answers
642 views

I am getting an error “org.openqa.selenium.NoSuchElementException” while running the selenium code

package captionlabs; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; public class Login_captionlabs { public static void main(String[] args) { System....
0
votes
1answer
709 views

Selenium - how to test email delivery

I have to test if users receive email correctly depending upon the following scenario. If user selects 3 mail per day : Should receive mails 3 mails in a day after every 8 hours. Daily : user ...
1
vote
1answer
1k views

driver.getTitle() returns “WebDriver” string everytime for different webpages

I am beginner in learning selenium. My code is like this: driver.get("http://opensource.demo.orangehrmlive.com/"); String T = driver.getTitle(); System.out.println(T); Instead of the actual page ...
0
votes
1answer
3k views

How to handle web element(enable button) having same Xpath?

I am working on a web page which having 3 web elements with 3 enable buttons and all buttons having same Xpath.so my need is to click on the button A and print the title of the webelement on every ...
-1
votes
1answer
971 views

Selenium can not locate sign in button for amazon.com [closed]

WebElement element = driver.findElement(By.className("nav-action-button")); Actions actions = new Actions(driver); try { JavascriptExecutor js = (...
1
vote
2answers
8k views

How to get count of 'li' elements list with selenium webdriver?

I have a list of li elements wrapped in sub-menu class of HTML, before clicking on any of the li element I wanted to cross check all li elements are present with getText() and length but not sure how ...
2
votes
3answers
1k views

Robotframework & Selenium2Library & Python - User sign up test problem (emaill address +n generation)

I am beginner in writing automated tests with robotframework(Python and Selenium2Libraries) and I've faced to the issue related to user registration flow. Challenge is: The application under test ...
4
votes
1answer
202 views

Selenium 3.0: Getting exception every time while launching firefox in remotewebdriver

I'm using Selenium 3.0 and I want to know what are the new updates in Selenium 3.0 over Selenium 2.0? I'm trying to launch my firefox driver using remotewebdriver and every time it throws an ...
2
votes
1answer
3k views

How to make multiple testcases of one value

I have created test cases for email but there are multiple negative test cases for email field then how should I pass multiple values in the input field. I have created function.but don't is that ...
4
votes
2answers
14k views

how do perform menu list selection in web application using selenium?

I am trying to select/navigate to a menu item in the provided URL. I tried Actions but It was not working. https://enterprise-demo.orangehrmlive.com/auth/login uid/pwd : admin/admin I wanted to ...
1
vote
2answers
266 views

What is the best way of separating tests from keywords using RobotFramework?

Our team wants to migrate the tests from QTP. We have the automation flows for UI, API and some database tests. After a long research, I found robotframework would be a nice tool.However as I started ...
3
votes
2answers
1k views

Updates in Selenium 3 over Selenium 2 [closed]

What are the new features/updates are available in Selenium 3 as compared with Selenium-2.0? What are the impacts of using Selenium 3.0? What are the recent errors which were found in Selenium 3.0? ...
1
vote
1answer
590 views

Is it possible to manually resume a session in selenium

Is there a way to hand off a selenium session to a browser locally. I'd like to run a script and somehow release the session or pause it so that I can resume testing from that point. Is this possible ...
1
vote
3answers
278 views

How to click an element which may require another icon be clicked on first

I have list of icons in a column , & at a time only one is clickable , but some times icon is not responding/clickable. TO make it clickable we have click refresh button near icon .
3
votes
3answers
5k views

How does TestNG priority work for a group?

Suppose I have five test cases out of which three are grouped in "Smoke Testing" and two have not been grouped at all. If I have set priority for all my test cases from 1 to 5, will the cases from ...
2
votes
1answer
4k views

Kill browser sessions when driver is instantiated on each test

I am developing a testing framework for an application at my work and am running in to an issue. I use Selenium 3.0.1, NUnit 3.5.0, NUnit3TestAdapter 3.6.0, and a Selenium Grid instance to run my ...
2
votes
1answer
620 views

Selenium Grid sending commands to the wrong node

I am working on setting up a distributed testing environment and am running in to an interesting issue. When running tests in parallel the tests seem to get routed to the correct nodes and execute to ...
5
votes
4answers
3k views

How to get multiple login instances working in Internet Explorer?

Am working on a banking application. Our requirement is to execute tests in parallel in one system. A) Below is how our application responds to selenium parallel execution :- Does not allow ...
3
votes
1answer
396 views

How to get the x, y axis location of the view itself in selenium [closed]

How to get the x, y-axis location of the view itself in selenium? I know I can get the position of a specific element. But I can't find a way to get the coordinate of the window's view itself. So I ...
0
votes
5answers
4k views

How to close pop up in Selenium web driver?

Please help me out for this problem. I tried to close this Pop-up page with Selenium, but not able to do it. HTML code <div class="popupsignup-disp"> <div class="popupsignup-cntbox"> ...
1
vote
0answers
394 views

how to use javascript in selenium for get data from excel

I am using selenium for data entry there are some drop downs in my web page I use dropDown.selectByVisibleText(input.getCellData(i, 0)); for every one but after first drop down it is not working ...
0
votes
1answer
84 views

Selenium Webdriver url related

I want to open any url in firefox browser but it does not open. what should I do? I installed firefox 47. I put in my code here. public class Baseclass { public static WebDriver driver; public ...
6
votes
2answers
2k views

Extending or passing the driver in page objects?

I have 2 different ways of working with the driver in the page object model: Creating the driver in all the pages and passing it from one class to another. You have an example here. Extending the ...
0
votes
2answers
67 views

What exception I will get If I use UnSelectall() on Normal Select element? [closed]

In Selenium I am using UnSelectAll() on a normal select/Input element( Not multi select). What exception I can expect?
5
votes
5answers
34k views

How to handle Login pop up by using Selenium, which is used for login to applications?

Steps that I have to perform I have a website (www.xyz.com) I successfully opened it through Firefox. In the page, there is a google icon (image) which I am suppose to click After clicking the ...
3
votes
0answers
409 views

How to configure Selenium+GitHub+Jenkins [closed]

I was trying to configure Selenium+GitHub+Jenkins but unable to do it, I was able to configure selenium and Jenkins but not with GitHub. We need to build in same workspace where is my code if not, ...
1
vote
1answer
2k views

What are the recovery scenario for Selenium Framework? [closed]

How to handle recovery scenario in my framework. In this framework I want to create some methods which work after catching exception. So that I can easily come back on the normal stage from any of the ...
1
vote
1answer
120 views

Selenium RC : How to handle drop down list while automating?

How to handle the drop down by using selenium RC. While I am automating Gmail registration page the birthday section giving error
1
vote
1answer
791 views

Select Window=Null equivalent in webdriver/java

While clicking the drop down, Selenium IDE records a selectWindow command as SelectWindow=null. What is the equivalent code in webdriver/java ? I tried driver.switchto.window("null"); but on trying it ...
2
votes
1answer
328 views

Expecting results in boolean[True/False] but getting status as “None” - Why? How to resolve?

I execute javascript below and it must return True or False and it would do the Run Keyword If the statement is False but what in ${CheckboxStatus} is None, instead of Boolean value True or False. ...
0
votes
1answer
46 views

Will android 5.0.1 sdk package work for android 5.0.4? [closed]

I have Android 5.0.4, so which Android SDK package do I need to Install? There are two Options available in Android SDK Manager ANDROID 5.1.1 ANDROID 5.0.1 My Device : 5.0.4
4
votes
4answers
2k views

Unexpected WebDriverWait / FluentWait behaviour - throws Exceptions anyway

I am having some issues with the way the WebDriverWait and FluentWait is (not) working. First of all, the requirement: Checking for the visibility of an validation error after submitting a login ...
1
vote
2answers
1k 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
2answers
6k 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:WARN ...
0
votes
2answers
67 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"
-2
votes
1answer
537 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....
1
vote
1answer
2k 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: .....
5
votes
1answer
3k views

Error in Maven project build-“Could not initialize class org.apache.maven.index.ArtifactInfo”

Hi All when I am trying to build or clean the Maven project I got below error can any help me ? Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'POM-...
3
votes
5answers
41k 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 ...
3
votes
4answers
174 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 ...