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
2answers
44 views

Convert Selenium Web Element to String C#

Basically, I'm making a programme that logs into the krispy kreme site and to test if login was successful, I am searching for a certain web element. I'm using selenium. For debugging purposes, and ...
0
votes
1answer
122 views

Waiting for a scroll to be over

I have this function who scroll an element into view and then click on it: private void iClickOnElement(WebElement element){ WebDriverWait wait = new WebDriverWait(driver, 10); ...
0
votes
0answers
24 views

Web driver get Item From Local Storage

Here my code: I am getting null exception String sItem = getItemFromLocalStorage("value"); System.out.println(sItem); } public static String getItemFromLocalStorage(String key) ...
0
votes
1answer
73 views

Why doesn't my XPath find my element on the page?

I am trying to retrieve the content of the header and each chapter which is a repetitive structure as you can see below. For this am using Selenium and C#. My attempt, using xpath, is this: string ...
0
votes
3answers
58 views

I can't find element using xpath [closed]

Please help me on this am trying to locate the element using xpath
-1
votes
1answer
112 views

In Selenium using Python facing error unable to locate element

from selenium import webdriver from selenium.webdriver.common.keys import Keys # create a new Firefox session driver = webdriver.Firefox() driver.implicitly_wait(30) driver.maximize_window() # ...
0
votes
0answers
26 views

RSelenium: How to click Element in stored page source

I have a quite lengthy scraped page source (it requires a lot of scrolling down to get the full data) in which I need to send clickElement to some elements throughout the page. Because the server ...
0
votes
0answers
31 views

Firefox opening wrong profile with selenium c#

I'm using selenium 3.14 with geckodriver 0.24, I'm using following code to run the existing profiles I have already created for my different accounts. FirefoxOptions firefoxOptions = new ...
0
votes
0answers
37 views

Open a clickable link on a web page and take the screenshot at the same time

I'm new to chrome headless and I have a problem. I want to randomly select two links from a web page on the page being viewed and open them at the same time. Indeed my goal is to be able to have the ...
0
votes
1answer
77 views

if statement throws an exception “org.openqa.selenium.NoSuchElementException” [duplicate]

There is a requirement to check the link "Show All" on page. If It is displayed on page click on that link to expand all the sites on page, then search and click on "Edit Site" button that is starting ...
0
votes
6answers
120 views

Is using “Selenium & Test NG” the best approach to Automate Regression Test Cases for Web based Application? [closed]

We have a requirement to automate Test Cases for a Web based application. We have to use only open source tools. Total Test Cases would be around 600-700.
-2
votes
2answers
95 views

Website login Issue in Selenium ChromeDriver

I am login to a website using Selenium and ChromeDriver. But website login details are shown as incorrect every time. But I have manually logged into the site using Chrome browser easily. How do I ...
3
votes
3answers
164 views

How to abstract data classes to be more object oriented?

I have run into problems keeping my tests as object-oriented as possible. I have had to rewrite large portions of my code multiple times now, and I feel that there is a better approach to what I'm ...
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
1answer
168 views

“failed to write automation extension zip” Error comes when I run my code after creating a Jar, It works in Eclipse IDE. But doesn't work as a Jar

Chrome version : 75.0.3770.100 C:\Users\ramkrishna.bhandare\Documents\StressTestExamination\OES Project>Title SeleniumExam. C:\Users\ramkrishna.bhandare\Documents\StressTestExamination\OES ...
-1
votes
2answers
93 views

Not able to click Logout Button eventhough able to identify the element in selenium webdriver

Environment : IE11 Webdriver/Selenium version : 3.141.59 Language : java Selenium code: driver.findElementByXPath("//span[contains(text(),'Logout')]").click();** HTML code : <span class="v-...
-1
votes
2answers
411 views

How Do I iterate through all the search results in Selenium returned by google search

My test steps are- a) go to google.com b) in the search box start typing a keyword example "IBM" c) google displays all the matching results d) Get the count of matching results in a List of strings....
0
votes
1answer
58 views

Tool which will record my browser actions and allow me to execute the recorded actions from code

I am first time trying out automated web UI testing. I just tried writing selenium python code which logs in to the website, waits till it redirects to target page and then tries to fetch certain ...
-1
votes
1answer
33 views

Testing Question in Selenium Python

How to get required item hrefs in a flipkart page? This is my code: from selenium import webdriver driver = webdriver.Firefox(executable_path ="/home/yegaiah/Desktop/geckodriver") website_URL ="...
2
votes
4answers
104 views

Is there a preferred programming language for working with webdriver? [closed]

I see there are a number of options from C# to Ruby to Python to Javascript. For a newbie to programming which language would you recommend I choose for this situation (webdriver and newbie ...
0
votes
1answer
63 views

POM + PF on project with web and responsive mobile web

I am using Selenium POM (page object model) with PF (page factory) for various desktop web browser tests. I just started quest - testing responsive mobile web on real mobile devices. I already have ...
0
votes
0answers
134 views

Selenium Webdriver - Toggle switch click is not working

I suppose to test toggle switch element to on and off, but while sending click to the element I am getting Clickable element not found error. I have corrected my code with chain action and JavaScript ...
0
votes
1answer
42 views

Issue in displaying webpage in IE11 in selenium webdriver

I am able to input the username, the password, and then click on the login button, but after clicking on the login button it displays nothing on webpage in IE11 but works fine with Chrome and Firefox. ...
0
votes
3answers
184 views

Test cases stop execution for next test cases after using soft assertion

I have used soft assertion in my test cases, but it stops the execution of all the next test cases. what I know if we are adding soft assertion then particular test case should fail and it should jump ...
0
votes
1answer
72 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
50 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
35 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
72 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
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" ...
0
votes
1answer
320 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
387 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
55 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
152 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
185 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
60 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
57 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
97 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
54 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
187 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
90 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
161 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....