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
1
vote
3answers
84 views

How to pass excel column values into different test methods of a class in Java Selenium

I have an excel which contains 4 columns with N rows. Let us say Col1, Col2, Col3, Col4 are the headers. Now I have a java class and there are 3 methods inside it. public class test(){ @Test(...
0
votes
0answers
20 views

[[TestNGClassFinder]] Unable to read methods on class

[[TestNGClassFinder]] Unable to read methods on class package.CreateCustomer - unable to resolve class reference org/openqa/selenium/WebDriver I have created a testNG program and run the program using ...
0
votes
1answer
42 views

java.lang.NullPointerException in Page object Model

I have created this program using TestNG and i'm getting this error java.lan*g.NullPointerException I have initialized the Webelement .But still i'm getting error POM.java package TestPOM; import java....
-3
votes
1answer
36 views

Why do we create parameterized constructor in every PageObject class which accepts one driver reference when BaseTest has a global driver object? [duplicate]

When every test class will inherit driver, then why should we create constructor that takes driver object? public class BaseTest{ public static Webdriver driver = new ChromeDriver(); } public class ...
0
votes
0answers
41 views

How can we use the “TableTransfomer” Method to read data from “DataTable” in Cucumber?

I am stuck with using a TableTransfomer Class to convert Datatable into desired domain object. I am following some examples from the web, but have completely messed up my code. I just want Cucumber ...
-1
votes
1answer
24 views

What does it mean to instantiate Webdriver in Selenium? [closed]

WebDriver driver = new ChromeDriver(); Now, when we "instantiate" Webdriver and create a reference variable and then assign the object returned to it, then does it mean that we have a new Chrome ...
0
votes
1answer
18 views

Element draged but not droped in destnation

//drag. WebElement From=driver.findElement(By.xpath("//div[@id='settings']//div[2]")); Thread.sleep(3000); // drop. WebElement To=driver.findElement(By....
0
votes
1answer
95 views

Importing test library 'AutoIt' failed: ModuleNotFoundError: No module named 'AutoIt' Error

I am trying to file upload in modal form using robot/eclipse but its not working. I added autoit library to red.xml. Giving below error . Below is my code for file upload Click Element xpath=//*[@...
0
votes
0answers
16 views

How to get data from PDF from URL having authentication using selenium?

I need to automate this flow where a PDF will be opened when i use the URL and enter the authentication. This flow has to be automated using Selenium. I tried PDFbox API but it works only for URL ...
0
votes
1answer
36 views

Select a day, month and year from calendar picker and copy the date value into a variable [duplicate]

I'm trying to select month, year and date from calendar date-picker. I'm writing my script using pom & page factory approach. I'm not able to pass the date I selected to the variable named ...
0
votes
2answers
51 views

Clicking on a tab using selenium not working

I'm trying to go through this site "https://www.dream11.com/cricket/create-team/1278/17702" and once this site is loaded, I want to click the skip button (which I can do) and then go on each of the ...
0
votes
0answers
112 views

Has anyone used Github Actions to run Selenium Tests on Safari and Macos VM?

Github Actions is a nice way to kick off builds and tests. However I'm unable to enable the "Allow Remote Automation" setting in Safari from the command line. I've found a few command line posts ...
2
votes
3answers
195 views

python+selenium+Unittest: get website cookie/manipulate cookie/send back. Possible?

Details: For our test procedures, we want to read the cookies of a website, manipulate the cookie and read it again. We want to test if this is possible at all to avoid a security gap. We use for ...
0
votes
3answers
106 views

Selenium un-enable to find element

I have been through every selenium related page on here but not much else I can really try. I am trying to click on the text link but It gives me 'org.openqa.selenium.WebDriverException: chrome not ...
0
votes
3answers
1k 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
73 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
92 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
62 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
48 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
106 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
2answers
559 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
2k 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
173 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
97 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
362 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
135 views
-1
votes
2answers
54 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
69 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
2k 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
98 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
65 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
111 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
2k 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
22 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
30 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
309 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
896 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
89 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
44 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
2k 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
53 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
631 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
899 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
2k 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
2k 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
10k 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
20k 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 ...
0
votes
3answers
5k 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
394 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
2 3 4 5
11