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
0
votes
2answers
74 views

Selenium Webdriver sendKeys method sending value twice

I have 6 selenium tests (TestNG) running on chrome and firefox (both up to date versions) which connect to Browser stack to run. the problem is that 1 of the test fails intermittently on Chrome as ...
0
votes
4answers
67 views

What is the best way to learn Selenium Webdriver or any Automation tool in general? [closed]

I have purchased a Selenium automation course and practice sometimes as per the code shown in the lecture. But, i am going very slow and circling in basic topics like dropdowns, select tag, waits etc. ...
0
votes
2answers
76 views

What are the things that one must consider while learning Selenium Webdriver Automation framework?

I am a newbie in Automated scripting using Selenium WebDriver with Java. Also, i have the most basic knowledge of core Java. With tons of resources on the web for learning WebDriver, i am a bit ...
0
votes
2answers
53 views

How can I verify that saved data is displayed corrrectly using Selenium + C#?

<p class="details-info-block__text"><span class="details-info-block__label">Business Address 1:</span> 1010 Priority Way West Dr</p> I want to verify the address value (e.g. "...
0
votes
1answer
37 views

How to read the excel (Later enter test data in application based on particular test script name)

I need your help, I want to read test data based on the Test script. And after reading data it should enter in the application. I am using selenium Java + Apache POI Below is the code please help. ...
0
votes
0answers
32 views

Using Selenium Webdriver Python Scripting file picker popup is not getting displayed using MACOS

Hi I have been trying to automate a page using Selenium Python on MACOS. And in one of the page there is a file picker popup that is supposed be displayed to upload files. Manually when running I get ...
1
vote
1answer
146 views

Disable physical mouse and keyboard in selenium

I am trying to run an automated test that requires me to move the mouse around the page. The problem is that whenever the person running the test moves the physical mouse while the test is running, ...
1
vote
1answer
70 views

How to get the href value from the xpath?

Below is my element location, i need to find the id from this link. <a href="bnf_view.aspx?QBnfId=BGOOE00003" class="case-hdr" xpath="1">Dean Ambrose</a> Expecting this output-BGOOE00003 ...
-1
votes
1answer
63 views

when I try to launch any driver the webpage is not getting loaded

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: syncGUID":"{4ef3f74f-a8c6-4d0a-9f70-82419b95c42f}","...
0
votes
2answers
71 views

Store values from table for use in later tests

Below is my HTML code. I need to be able to save the names in the table rows (Saurav P, Ranjit M) to use in later tests. <table cellspacing="0" cellpadding="0" summary="Case managers who sign ...
0
votes
3answers
85 views

How to identify the web-element for a Text Box using Selenium

I am attempting to locate the empty textbox by the input id 'Department_input' <input id="Department_input" type="text" aria-required="true" size="40" class="field_input ui-widget-content" ...
1
vote
0answers
55 views
-1
votes
2answers
49 views

Either its possible to get and show a value from front end in selenium Java. If so, then how I can do this

I am testing a website and I need to perform some action on the basis of Price. It is showing price in Remaining Budget. I want to check the remaining budget and then on the basis of it want to ...
2
votes
2answers
66 views

if/else condition is not working as expected

WebElement radio= driver.findElement(By.xpath("//[@id=\"mydiv\"]/form/div[1]/div[3]/label")); if (radio.isSelected()){ Thread.sleep(2000); driver.findElement(By.xpath("//*[@id=\"mydiv\"]/form/...
0
votes
3answers
612 views

Unable to find element with css selector == input[name='username']

WebElement username = driver.findElement(By.cssSelector("input[name='username']")); The statement mentioned above was working before but right now concerned element can't be captured and error ...
-1
votes
2answers
64 views

How to interact with web elements with the same ID's?

I have three drop-downs with same ID's and want to click each of them, one by one, but it will click the same element three times. The remaining two elements are failing, but that test case is passed. ...
1
vote
3answers
63 views

is there any possibility to check the button sizes and images are loading or not in selenium?

how can I check frontend button sizes, logos, and images are loading or not?
2
votes
2answers
101 views

What is the best way to automate a system, where the XPath is not static?

I have to automate a system, which changes its ID's from time to time, and the XPath is not static. What is the best way to automate this kind of system?
4
votes
2answers
807 views

How can I handle alert using if else condition in selenium?

else is perfectly executed but if block is not executed - can anyone help me? WebDriverWait wait = new WebDriverWait(Maf_Base.getDriver(), 10 /*timeout in seconds*/); if(wait.until(...
1
vote
0answers
21 views

How to print the webservice(jqurey) hit on the console for search functionality

Open a website, press F12 go to network option and enable preserve log now type the work you want to search eg:dogs we can see the service "http://search.test.com/search........." here i want the ...
0
votes
1answer
29 views

Finding an element by tagname's value

In our app that we are using, there are widgets on the page, lots and lots of widgets. There is a HTML tag called widgetkey in it, with an 'id' value associated with it. Here is the exact HTML: <...
2
votes
1answer
206 views

Selenium exception is reported twice in logs

I am using Cucumber Page Object model to execute my tests. Here is my POM file:- <dependencies> <dependency> <groupId>info.cukes</groupId> <artifactId&...
0
votes
1answer
629 views

how to run same testcase in 2 different URL in selenium JAVA [closed]

How do I run the same test case in 2 different URL which has same functionality
2
votes
2answers
85 views

How can we automate the fields if there are multiple data components are present on UI and we need find inside elements

I am new to selenium. following are some info. Can someone guide me to create xpath and this is the approach we are using to maintain the UI elements unique, so for this code, will selenium help to ...
-2
votes
1answer
43 views

Double decimal value

public static String TaxAmount(String totprice,String tax) { String strD2=tax; double totalprice= Double.parseDouble(strD2); String strDl = totprice.trim(); if(strDl....
1
vote
3answers
777 views

How to accept Alert message in Selenium Java

I tried driver.switchTo().alert().accept(); but still i am unable to accept the alert message. please let me know the code to accept below message. enclosed screenshot of message and XML
0
votes
1answer
41 views

Fetch paid Amount value from iframe

if(ScenarioName.equals("MoveinwithVantivCard")) { driver.findElement(By.id("btnsave")).click(); // driver.switchTo().frame("paymentIFrame"); driver.switchTo().frame(driver.findElement(By....
1
vote
1answer
446 views

unable to click modal popup using selenium

I Have an application developed using Electron+Chromium when browser launched without any URL there will be a popup. This is a modal popup and using selenium I'm unable to handle this popup. HTML ...
0
votes
2answers
477 views

How to parameterize locator in Selenium

I am new to selenium, And In my scenario I need to select a product for list of products in the page. And Product name to select is a test data. Now my query is,Can I create Object in Class level ( ...
1
vote
3answers
1k views

Multiple @tests but did not execute the priority 2 and priority 3

Can someone let me know why it stops execute after the first @test(priority=1)? It ran the @beforeclass, then @test(priority 1) then @aftermethod. So it skipped @test(prority=2) and @test(priority=3) ...
1
vote
1answer
1k views

How do I use Selenium to drag and drop drawing elements into a canvas?

I have an element with an id which I need to select, then drag and drop into a drawing canvas. How do I do this? The element is outside the canvas and I need to draw it inside the canvas. function ...
-1
votes
5answers
7k views

Unable to click on checkbox using Selenium & Java

please send me the full code I tried Some XPath and CSS: XPath: //div[@id='autofill']/div/label //div[4]/div/label CSS: div.col-md-1.checkbox.checkbox-primary > label* but using above ...
3
votes
4answers
15k views

How to handle browser closing popup

In one of my scenario I am filling the form but not submitting due to my requirement. Now I am closing the browser but while closing browser it is browser an alert by saying "Are you sure .... ". How ...
-1
votes
3answers
3k views

How do I get particular textNode value of a DOM with Selenium

Hello I am trying to find Load # detail from this site. Also You can refer screenshot too. I have tried with xpath: //div[@class='equipment_item']//text()[preceding-sibling::strong[text()='Load #:']][...
0
votes
2answers
329 views

How to handle dynamic submenu items diaplaying based on different user roles in selenium?

I have the following menu structure: Main Menu1 > Sub menu1, submenu2 Main Menu2 > sub menu 1 etc. And sub menus change based on different user. I need to have common method to handle this. ...
0
votes
3answers
2k views

Automation testing of mainframe application using Selenium

is it feasible to test mainframe, which is a desktop based application with selenium? If yes, then how?
1
vote
2answers
586 views

Selenium: Getting error with webElement or Webdriver “Drive” Variable

New to automation. Help is greatly needed Anybody could help me with following code Why i am getting NullPointerException? Error: Null pointer access: The variable driver can only be null at this ...
1
vote
1answer
7k views

Uploading a file to a web site: how to handle Windows dialog to choose a file

Just reviewed questions that may already have the answer, but failed to find anything relevant. So the site I am testing has a file upload dialog. When you click Select File -> Browse, a Windows File ...
-1
votes
4answers
8k views

Button won't click even though I can see it's taking me to the button when doing automation

My code which takes me to the button and highlights it (I'm running java scripts within Eclipse) driver.findElement(By.xpath("//button[contains(text(),'Save')]")).click(); My HTML code <button ...
4
votes
1answer
2k views

How do I validate dynamically changing data using Selenium

I have to use Selenium to test an application with a live time stamp. My code is: String validationmessage=driver.findElement(By.xpath("//div[@id='part_log_details']/p[1]")).getText(); System.out....
1
vote
1answer
1k views

How to get List of similar elements using javascriptexecutor using selenium webdriver

I want to get list of similar element into arraylist using javascriptexecutor. However able to store only single element using javascriptexecutor. Here is my code: JavascriptExecutor js = (...
2
votes
3answers
3k views

How to run selenium-cucumber eclipse project through command prompt

I need to run selenium-cucumber (Junit) project from command prompt. I tried using the statement in command prompt: java -cp E:\Workspace2\AP\Jars\*;E:\Workspace2\AP\src\stepDefinition\ cucumber.api....
-1
votes
2answers
4k views

How to write XPath under tag: strong<> <br> after every <strong>

I am trying to find xpath of text 262567 of given below HTML code : <div class="lessthanhalf" > <h4> Listing</h4> <strong style="background: rgb(204, 136, 136); border: 2px ...
1
vote
2answers
5k views

Unable to click on dropdown element using for loop [closed]

I wrote a for loop code that can access a dropdown list. I'm able to print the list but the code is unable to click on the specified option public void userCapturesAccountDetails() { WebDriver ...
1
vote
1answer
18k views

How to use a regular expression to identify xpath of element with autogenerating id

I need to access this element: <input id ="combo-1105-inputWrap"> The 4 digits in the xpath are autogenerated per browser session. I need to find that particular xpath and key in the data. ...
0
votes
1answer
2k views

Element not visible even id present for the element

I want to check one element, with help of that element id, prepared selenium web driver script, when will click on that ui element it will open another hided section on same window, but getting error "...
1
vote
1answer
89 views

Selenium scripts will run successfully on different versions of windows OS?

I have some selenium scripts for my project. I have developed and tested on windows 7 OS.But I would like to know whether these same scripts will run successfully on different versions of windows OS ...
1
vote
2answers
1k views

Duplicate records identification in selenium [closed]

I was asked in an interview this question That two different scenario requires data from a common sheet. How to we identify that data already used , while passing it as input. In general how to ...
2
votes
0answers
587 views

How to set browser window size using Phantom JS + Java

I am working on PhantomJS with Java for one of my project. I am looking for some help in working with PhantomJS in following scenario. Scenario : Step-1 : Mouse hover on tab/link then 2 sub-links ...
0
votes
2answers
2k views

Getting an error after execution as FAILED CONFIGURATION: @BeforeTest Login [closed]

java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/...