Questions tagged [selenium-webdriver]

Used for questions about using Selenium WebDriver, a browser automation framework frequently used to automate testing in a browser.

Filter by
Sorted by
Tagged with
0
votes
1answer
80 views

How to run my selenium runnable jar in a different machine without driver files

I am trying to export my project as a runnable jar and run it without driver.exe files being present. I tried incorporating them with below code to make it independent but still unable to run the jar ...
0
votes
1answer
38 views

what does the JavascriptExecutor declaration actually means [closed]

I am trying to understand the meaning of the following declaration: JavascriptExecutor js = (JavascriptExecutor) driver; I know that the left side means to create an identifier js with type as ...
1
vote
2answers
53 views

Creating a common import statement for commonly used imports

import java.util.Properties; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; I have a page object model and each page object requires these ...
0
votes
1answer
38 views

change attribute value using selenuim python

I am try to change non input attribute value in Firefox frame in the format: <div id='100' class='abc'> <p> hello </p> </div> <div id='200' class='abc'> <p> hello ...
0
votes
2answers
76 views

assertequals() returns true but make my test case failed

I have added assertion(Assert.assertEquals(condition,"expected","message")), it returns true then also it gives an error and make my testcase failed, with Assertion error and message? Can any one help ...
0
votes
3answers
89 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" ...
0
votes
1answer
452 views

Selenium: how to prevent a just-started Chrome window from receiving focus

Using Selenium + chromedriver on Linux, like so; chrome_options = Options() driver = webdriver.Chrome('/usr/bin/chromedriver',options=chrome_options) driver.get('https://www.somewebsite.com') Chrome ...
1
vote
1answer
449 views

Can I create an executable TestNG Selenium jar with my tests using maven

##### My POM file pom.xml http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 company.myproj myproj 0.0.1 jar <properties> <project.build.sourceEncoding>UTF-8</project....
-1
votes
2answers
58 views

What is the difference between hasNext() and next()? [closed]

What is the difference between hasNext() and next() and where it is used? Is it used in Selenium WebDriver or Selenium IDE.
1
vote
1answer
48 views

Azure Access to Internal Selenium Server

Asking those network people smarter than me....We are currently testing out DevOps but one thing that I can't do is have MSTest hit our internal server (which is housed in Azure) that contains ...
-1
votes
2answers
175 views

Getting error in selenium with node.js automation

I am working on automation. I am using Selenium with nodejs code. I am just beginning to learn selenium with nodejs. I am trying to open a application, but I am getting error. Here is my sample code.....
0
votes
1answer
204 views

Need help sending text to field

Using Python and Selenium, how can I send text to an element that is 'hidden?' When trying to do it, I am getting errors that the element is obstructed by another element. The field I am trying to ...
0
votes
3answers
61 views

Trouble deleting NaN in input field

I'm using Selenium to fill in a web form. The fields there have their default values, usually it's 0. If I issue the command Driver.chrome.FindElement(By.Id("ID_of_my_element")).Clear(); the value ...
0
votes
2answers
50 views

I have added Assertion in my tc and make the login tc failed but I am not getting any output on console provided in assertion

I have added Assertion(Assert.asserttrue(true,"login failed")) in my every tc and conditions are according to that but when login tc failed I am not getting any output on console provided in ...
-1
votes
1answer
59 views

Why tests fail when run in eclipse after creating through selenium IDE?

I have created many tests using Selenium IDE and exported into java files in order to run in eclipse. All tests work properly in Selenium IDE but when I run in eclipse(java file) it creates following ...
0
votes
1answer
47 views

Unable to execute single tc, login then run other application features, right now its running as a suite

I have to execute my test cases as a single as well as a suite, right now its running as a suite but not as a single test case in selenium webdriver: Below is my test which are calling methods present ...
0
votes
2answers
105 views

Unable to find xpath using position(), last(),[1] indexing([1]--eg.) following:siblings, child, parent nothing is working

I am trying to find out the XPATH. I am getting 30 matches for an element. I tried using last(), position(), indexing[], child, parent, following:siblings, preceding:siblings, absolute XPATH is also ...
0
votes
2answers
52 views

How to write an xpath for a specific text from a whole attribute?

So the problem statement is: I need to store a specific number(marked in RED) from the attribute & for that I want to point to that number in an xPath. Is that possible?
0
votes
1answer
55 views

How to click a expand button if ID is randomly generated

I have a problem how to click a desired expand button if ID is randomly generated. This means that the ID has another value after refresh page. Of course, the ID has another value for each row. I don'...
-1
votes
1answer
55 views

Does testing the individual testcase is necessary during automation?

I have a automation setup where I have my automation scripts integrated with GIT. When the new code is committed, the script will trigger automatically and run the regression. Assume if the code ...
1
vote
1answer
215 views

How to split a variable in Selenium IDE?

I am quite new to Selenium IDE. I want to split an error message and extract the first word of the error message. I have used the following commands as in the image. Following are the results of the ...
1
vote
2answers
64 views

Handling the case when users get different main pages based on usertype after login

It's more like a theoretical question and I am seeking the best practice here. Given an application where you have different user types, newly registered users get a new UI while old users are ...
0
votes
1answer
108 views

How can I improve this python pytest excel data handling code? Does pytest have something like TestNG dataprovider?

Does Python Pytest have anything similiar to Java TestNG DataProvider where you can pass in a set of data for the tests? I created something to take the data from my excel list using openpyxl and it ...
0
votes
0answers
29 views

Code is not being executed once being tried to come back to parent window

My test case is about opening the child window by pressing the button located on main window and closing the child one and after that, i have to press another button which is in parent window but i ...
-1
votes
1answer
47 views

How to identify the button WebElement

I want to click this button. but I can not find any web element so that the driver can find out. Help me to fix this. <button type="submit" class="signupbtn btn_full btn btn-action btn-block btn-...
0
votes
0answers
170 views

Getting Cannot instantiate class error

package com.crm.qa.test; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import com.crm.qa.base....
1
vote
0answers
82 views

JMeter Selenium Browser not opening up new tab

I am executing my Jmeter test with Selenium and once I click on an Analysis link, it ideally opens up in a new tab on the same browser window. However, If I am click on the link using Jmeter Selenium, ...
0
votes
0answers
185 views

Selenium Browser Access denied issue

When I click on Search flight button through selenium scripts then got following error message. Access Denied You don't have permission to access "http://www.makemytrip.com/flight/search?" on this ...
4
votes
2answers
126 views

Is it okay to use UI automation code in API automation tests?

Say that I am testing a GET api. The get api fetches data which is stored due to user actions on a web UI. The data cannot be setup by simply looking at the network inspector calls for these actions ...
1
vote
1answer
448 views

Selenium can't click href

I want to click on a href(all of the delete ones), but can't <a href="#delete"><img height="16px" width="16px" src="/images/icons/trash_16.gif"></a> I've tired (both delete and #...
0
votes
0answers
114 views

How do I write console output values (from eclipse) in excel sheet through selenium WebDriver?

I want to print my verification messages in Excel instead of Eclipse console. Can you provide your suggestion to do above scenario in Selenium? Ex: Getting the Page title and printing in the console: ...
0
votes
0answers
95 views

Selenium IDE - fakepath

I need to upload a file through "browse" button , but when I chose a file , it seems as "fakepath" . My test faces an issue. How can I deal with it?
0
votes
2answers
138 views

Can't Select random months dates using jquery calender

I have Jquery calender in my application. I have task to select dates from different months using Selenium, but I can do only previous month and forward month. Actually I need to select dates from ...
0
votes
2answers
53 views

Which is faster: creating a method to reference a web element by label text, or directly referencing the element via a UI?

The automation framework I'm working within has a method in the PageObject file to return a WebElement by its label text: getSubTab : { value : function(value){ return this.navTabs.filter(...
0
votes
2answers
383 views

Unable to enter text in Twitter using Selenium Webdriver

I'm trying to automate Tweeting using Selenium Webdriver in Chrome. I can login and click the Tweet button, opening the Compose new Tweet box, but when I try to enter text with element.sendKeys(...
0
votes
2answers
102 views

How to get XPath for the text after the <b> tags

I Need to get XPath for the following, to get the text after the <b> tags <li class="SpacedOut"> <b>Name 6:</b> "ABC" <b>Name 1:</b> "BCD" <b>Name ...
4
votes
4answers
232 views

How to inspect elements on pages with 'loading' spinners?

Note: This is intended as a Q and A post for sharing successful strategies. Please, feel free to add more solutions! Problem background: Automating a web application Tester with limited access to ...
0
votes
0answers
18 views

Error shown when trying to put dropdown list values onto Excel sheet using Selenium WebDriver & Apache POI

Scenario :- I have an HTML File that contains a drop down list containing some values in it. I need to add the values of dropdown list onto Excel sheet using Selenium Apache POI. I have written ...
0
votes
3answers
427 views

Issue using XPath

I'm having an issue. I'm using Selenium and PyCharm. Website: https://www.expedia.com/ I'm trying to click() on the "Search" button. I used these: driver.find_element(By.ID, "search-button-hp-...
1
vote
1answer
852 views

How to handle SSL certificates in chrome using Selenium?

I am trying to post something on facebook using selenium. But after successfully logged in, i am getting SSL certificate to allow or block the notification of Facebook. I am not aware how to handle ...
0
votes
1answer
44 views

How I can calculate the sum of items that are stored in main Id and then sub_id in that main Id

Look at the image here you can see the Dom that how its showing one main div with ID and then item are there in that div. I have to calculate all the items on a page that are shown to user. These ...
1
vote
0answers
43 views

Is there an argument for chromedriver to accept notifications?

I am using Nightwatch to run my chromedriver, and I need to accept notifications through the browser. I have found this list of chromedriver arguments, but I haven't been able to find any that ...
1
vote
0answers
72 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 ...
0
votes
0answers
60 views

Extent Report : [TestNG] Reporter x.x.ExtentReportListener.ExtentReport@afc191 failed java.lang.NullPointerException

Getting nullPointer exception in extent report . Help me on this issue unable to trace the root cause Using extent report 2.41.0 Here is the my log: [TestNG] Reporter com.psiexams.base....
0
votes
1answer
178 views

Selenium WebDriver “Cannot instantiate class ” error is coming

Below is my Base Class: package com.mercury.qa.base; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Properties; import java.util....
-1
votes
1answer
47 views

How can I close alert message by enter action through keyboard?

I'm looking for a different way to close an alert message other than accept() or dismiss() methods. How can I close an alert message by entering action through the keyboard?
0
votes
2answers
52 views

Capture arguments of onclick() javascript call using Selenium Java

I am writing a selenium script in Java to capture the arguments passed in JavaScript onclick() call/method. Attached is the image in which method/function name is highlighted. Now, In this method ...
1
vote
1answer
132 views

How do I store a value in a global variable and then use it in subsequent steps of a scenario in protractor cucumber typescript based project

I want to retrieve a value in 'Given' function and then store it in a global variable so that the value is accessible in subsequent steps of a scenario in protractor cucumber typescript based ...
0
votes
2answers
56 views

How can we run only selected testcases from extent.html report in selenium webdriver?

I'am running testng suite and then extent.html report is being generated. Now I want to customize my report like; i should be able to select only failed testcases in my report and then should be able ...