want to capture data after the search action using selenium webdriver - selenium

I am working on a ERP application, where I have to click on a search button, after which it will give me list of data.
Want automate that using webdriver
Screenshot
The search tab is empty before the search option.
How to check, whether the data is coming after pressing the search button or not?

If you are getting the data in a tabular form you can use something like:
List<WebElements> tableRows = driver.findElements(By.tagName("tr"));
and then you can check the size and do whatever you want.

Related

How to get the xpath of suggested items of google place auto complete field in selenium

I am doing a selenium project. There is a field called address which is a google place auto complete field that suggests palces name like dropdown. Problem with the field is, it cannot be inspected. Whenever i click on inspection button the suggested auto complete list get disappeard?
How can I automate this?

Using puppeteer to automate button clicks for every button at every URL in a web app

I am currently trying to use JS and puppeteer to take a screenshot of every url in my web app, as well as take a screenshot of every button that can be clicked. Is there a way to click each button without specifying the id? Not all of my buttons have an id and even if they did, I wouldn't want to have x number of page.click(id, options) for each button I have (which is quite a lot).
Thanks
I have tried going based off each className (this app is built using react) but this does not work. It will take a screenshot of the same buttons over and over. I believe because if page.click has multiple of the same options, it only chooses the first one and many buttons have the same styling classNames.
You could get an array of each element on a page, go through the elements with a for loop determine if it is a button, then click it. Then for each page you'd have to input each url in an array and then use a for loop to go through it.

Using Rally Excel-Addin, can I add tags when importing new userstories to Rally?

While importing user stories with Tags column from spreadsheet, I run into issue that Tags cannot be imported.
Is there a way to do that using Rally excel-addin. The tags currently exist in Rally. Please let me know your thoughts.
Thanks!
It is currently not possible to import Tags using the Excel Add-in. You will need to add the Tags using the WebUI after the import. You can do this using Bulk-Edit:
Put a Custom List app on your dashboard or a custom page and set the
work item type to User Story.
Set the "show" parameter at the bottom left of the results to 200
(the maximum batch size).
Tick the select all checkbox at the upper right.
Click the gear icon next to any work item- this will return the Bulk
Actions menu.
From Bulk Actions choose "Tag...".
The Excel Add-in is currently undergoing a rewrite an this capability will, hopefully, be a part of the new version.

How to create test cases result or any new item in Rally app

I have a custom app report that shows test cases not run for test set. I need to have a button/link upon clicking of which I can enter a test case result. So far the code that I have is opening up the correct test case result window but upon clicking Save it hangs. When I checked the console output for this hanging window it showed that session was unknown. So the question is can this be achieved with custom generated link and pass the session somehow or the approach should be entirely different. Currently I am using 2.0.p5
Here's an app that uses Rally.nav.Manager.create to instantiate a TestCaseResult editor in response to a button click from a grid cell, in turn based on this answer: How to add a custom button on grid and pass row values?
https://github.com/markwilliams970/TestCaseGrid-AddResults

How to assert a button's property

I am using selenium web driver and currently automating a registration form. There are various fields like username,password etc which we have to fill in the details and click on the terms and conditions check box and the account create button gets enabled.
Right now there is some issue with the java script and all my assertions for the create account button is failing. Is there any way I can work on this issue?
possible solution:
apply getAttribute() function to the element you need. And compare data obtained with expected data to be:
WebElement button = driver.findElement(By.xpath(..blablblalb...));
String color= button.getAttribute("color");
//verifyinh that color is that of expected
Assert.assertTrue(color.contains("red"));