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.

1
vote
2answers
235 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 ...
0
votes
1answer
16k views

Running my first program using TestNG and getting error

I am getting following error when run my selenium webdriver progarm using testNG: org.testng.TestNGException: Cannot find class in classpath: testng at org.testng.xml.XmlClass.loadClass(XmlClass....
1
vote
1answer
546 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
4answers
2k 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()...
3
votes
2answers
1k views

How to find and close particular browser window from number of opened windows using Selenium?

Suppose there are five Browser windows opened, how to find the third one and close it through web driver? Please I'm request you to all of you don't consider this question as a opinion based. I have ...
0
votes
1answer
5k views

Which Firefox version is more compatible with Selenium IDE and Firebug? [closed]

Firefox Browser compatibility with Selenium IDE and Firebug Plugins or addons.
1
vote
2answers
1k views

Which Programming Language is more supportive to start with Selenium? [closed]

I am looking to start with selenium, so please suggest me which language is good for automation testing?
2
votes
2answers
190 views

How to locate xpath for given tag? [closed]

I am trying to automate one of site and the below are the html code for same <a href="http://register.rediff.com/register/register.php?FormName=user_details">Create a Rediffmail account</a&...
3
votes
2answers
1k views

How to run multiple Test cases on different browsers in TestNG with Java

I'm new at TestNG. So, I want to know more details about how to run multiple test-cases on different browsers. Which Framework model should I use in my project? So that each & every part of my ...
3
votes
2answers
318 views

Unable to locate element on Win-7 Safari browser using Selenium

I have written Selenium script & it sucessfully executed on FF, chrome & IE. But when I tried it on Safari it gives error while clicking on button. I used Selenium-java-2.52 version jars & ...
4
votes
2answers
416 views

Firefox does not shows saved bookmarks, addons while launching?

When I am running software web application's tests In Firefox Browser using selenium WebDriver, It Is not showing me any bookmarks, addons, saved passwords etc in that browser. Have you observed this? ...
6
votes
2answers
674 views

Are there any non-selenium based tools for Automation testing? [closed]

I'm aware of automation tools like- Selenium, Appium, Selendroid. Is there any other tool available in the market which is used for automation testing outside of the selenium group?
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
6k views

What are Selenium, JUnit, Ant and JScover and how they are combined?

I am given a javascript function which takes as input some numbers and returns the max, as a part of a project at the university, and I have to test it, using Selenium, JUnit, Ant and JScover. I have ...
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 ...
2
votes
1answer
568 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 ...
22
votes
7answers
96k 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\...
9
votes
3answers
4k views

Attach to browser not spawned by Selenium2

One of the things that I miss about WatiN is the ability to attach to browser instances that were not spawned by Selenium. In my last position, this was the whole reason why I used WatiN, as the ...
2
votes
5answers
7k views

Select a certain item by clicking a link beside that item

I have a popup with list of names. I need to choose "mahmoud" for instance by clicking the "select" link beside the label "mahmoud". How to click that select? I am using selenium webdriver with python....
3
votes
4answers
1k views

Does anyone have any suggestions for a Selenium with Ruby tutorials?

I have gone through this book http://www.compendiumdev.co.uk/selenium/ which is excellent and I highly recommend it to everyone! I was wondering if there is a similar book/tutorial with a Ruby focus ...
1
vote
2answers
11k views

Selecting xpath using a variable in selenium 2

I am doing a selenium automation where I want to pass the variable into the XPath and select the element. The xpath which I am trying looks like: browser.find_element_by_xpath("//span[contains(.,'...
4
votes
1answer
14k views

How to retrieve INT value from TEXT box using Selenium/Webdriver Python binding?

I have this code: tcost = driver.find_element_by_id("MainContent_txtTotalCost").text total = int(tcost) driver.find_element_by_id("MainContent_txtVisa").send_keys(total/2) driver.find_element_by_id("...
8
votes
1answer
8k views

Faking system time/date with Selenium Webdriver?

Is webdriver capable to run a browser with a faked time, date or time zone? Such ability would be highly useful for my automation purposes. Yet, I did not find any such ability in the webdriver ...
10
votes
5answers
13k views

Testing Page Layout with webdriver

Has anyone tried to test the page layout of a website using webdriver? To be specific, using webelement.getPosition() and webelement.getDimension(). Shouldn't these two methods be enough for testing ...
6
votes
1answer
55k views

How to switch-handle-close particular popup window, When multiple popups are opened?

I know how to switch to single popup window, but I do not know how to switch particular popup window when you have more popup windows. Scenario is: Go to the each and every popup Get the title ...
4
votes
2answers
404 views

Are there any issues with Selenium v2.53 and Firefox v45.0.1?

I have a couple of tests, which I run them on windows and I have a successful run. But when I move to UBUNTU server with Xvfb, I faced problem with tests, some of them failed!! both cases I used: ...
3
votes
3answers
6k 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....
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
1
vote
2answers
886 views

Solution on ElementNotVisibleException in Selenium

I need to click on a link which displays a popup. But, I'm receiving the following exception: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be ...
2
votes
2answers
4k 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
5answers
13k views

Unable to enter the text in a text box

I am trying to enter the text in a textbox, but I am getting an error as follows org.openqa.selenium.InvalidElementStateException: Element must not be hidden, disabled or read-only Anybody can ...
1
vote
0answers
320 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
2k views

How to use pagefactory in POM? why we pass parameters in pagefactory? [duplicate]

While developing a script using Page Object Model, we use PageFactory.initElements(driver,this) to initialize the webelement. How this is done and why we pass parameters 'driver' and 'this' ?
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 ...
2
votes
3answers
9k views

Wait for a random time with robot selenium 2 library

After submitting a POST request with a button click from a webpage, I want to wait for 60 seconds and click a link on that same page. The wait for 60 seconds part, is that possible to implement with ...
0
votes
2answers
59 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?
3
votes
3answers
3k views

Is there any way to convert existing QTP script in to selenium?

Is there any way to convert existing QTP script in to selenium? if yes then how ? is there any converter to convert or recreation of script is only possible solution for tha?
0
votes
3answers
122 views

how do i use list for selenium web driver in java

how do i use list for selenium web driver in java I need to select id which are continuously changing, and one id is in one row. need to select id from each Edit : <tr id="tr-132885-id" ...
1
vote
3answers
541 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
2answers
4k views

Selenium WebDriver - How to clear RadEditor content

I am working to write some Selenium WebDriver scripts that work with Telerik RadEditor controls. I can successfully enter content into the RadEditor in the following way with C#: Driver.FindElement(...
3
votes
0answers
389 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, ...
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 ...
5
votes
5answers
58k views

Not able to scroll down page using Selenium webdriver [duplicate]

I want to scroll down a page that is coming inside a form, not on the main page. I tried this code: JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("window.scrollBy(0,250)", "...
1
vote
1answer
752 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 ...
1
vote
1answer
2k views

Selenium webdriver not recognizing div element

I have found several questions related to this one particular travel website MakeMyTrip, so I tried to automating it. I was successful in selecting the primary details and getting on the Flight ...
2
votes
1answer
9k views

How to change the Text of a IWebElement of Selenium in C#

The Title pretty much explains everything. I'm searching for a way to change let's say <h1 id="title">Title<h1> to <h1 id="title">Nothing<h1> I'm kind of desperate since ...
2
votes
1answer
286 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. ...
1
vote
3answers
2k 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....
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 ...
2
votes
2answers
3k 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:/...