SELENIUM - Dropdowns in popupwindow - selenium-webdriver

My script goes like this - from main page click a button which opens a window with search criteria which contains drop down to select options, when I select values and search in popupwindow, nothing is happening.
it stalls in popupwindow with selected value in dropdown but the search click function doesn't execute.

Related

tealium button click track

I have an application page , where clicking on button "find product" , goes to search products page with a list of products mapped search criteria selected on previous page.
page 1. search criteria, "find product" button
page 2. products list matching search criteria
I would like to track "find product" click event. As soon as find product button clicked, user will be navigated to page 2.
Not sure, if a page load is occurring on a button click, will I be able to capture and track button click event ?
I am thinking to use "utag.link" implementation for this.
May be I am wrong, any suggestions helpful.
-Thanks.
You could add the utag.link event on the mousedown interaction to give you a few milliseconds head start on the tracking.

MS Access 2016 Open Record on Click and Then Be Able To Go To Previous Or Next Record

Long time reader first time poster here. I have basic knowledge of access coding but nothing fancy. Anyways here it goes. I have coded on click from a Tubular List in access of our products table to be able to open up a certain specific file. When I click on a product name or SKU it does just that and opens that specific record for me called (Product Profile Form). AWESOME! I have on that Product Profile Form Next and Previous Buttons to go to the next or previous records. But if I go through the Product List and click on the Product Title. It Opens and If I then click Next or Previous record Button it first shows a blank Product Profile but on the next click it says "You cant go to that specific record" in a pop up. The Code Macro I have on the Tubular Product List Form is
/ Form Name: Parent Product Profile Form /
View: Form /
Filter Name: /
Where Condition=: ="[Product Parent SKU]='" & [Product Parent SKU] & "'" /
Data Mode: Edit /
Window Mode: Normal /
Parent Product SKU is The Primary Key Field Name in my ParentProductTable
I have tried and tried to figure this out for hours online and here.
Thank you all for any help.
Ok I solved it myself and if anyone else has this same issue the resolution is this. Make a command button on your form. You will have to run a few different macros for the on click event for the command Button. For the Next Record Button After clicking where you want your command button to go on your form the Command button wizard will pop up. Choose Record Navigation in the categories box and then choose Go To Next Record in the Actions Box. Finish the Command Button Wizard. Then Right click the button and choose Build an event. This will open the Macro Tools. Click add new action and choose the Macro RemoveFilterSort.After that if you hover over the macro RemoveFilterSort you will see green arrows to place your macros in the order you want. Click the green arrows up until it is first at the top. Click Save and then exit. Now you should be able to go to the next record. Do the same for the previous record except in the command wizard pop up choose Record Navigation in the Categories area and then choose Go To Previous Record instead of like before we chose Go To Next Record. I am using Access 2016. What you basically did is told the button to remove the filters before moving on to the next or previous record. If you dont want to make command buttons and use the access supplied navigation buttons at the bottom. You can make a command button with the macro RemoveFilterSort only and you will have to click this button to remove the filter then you can click the Access supplied navigation button. I hope this helps someone.

Click button until button disappears from webPage

I have web page in which it displays only 10 items if there are more then 10 items on the page then show more button displays, so need to click on show more button to see more then 10 items.
Problem is when I click on show more button it will display 10 more item and then again i have to click show more button to see next 10 more item and once all items are displayed on the page then show more button disappears from page.
Here I want to click show more button until all the items are displayed
How to achieve this using Selenium + Web driver?
Until "show more" button present keep clicking on that link in loop.
while(isElementPresent(By.linkText("Show more"))) {
driver.findElement(By.linkText("Show more")).click();
Thread.sleep(100);
}
Check here for isElemenetPresent() methods implimentation.
P.S : For safety break the loop after reaching some max limit.

Selenium click absolute element out of view

i have an selenium test for an Primefaces Website
I want to select a item in a combobox
when i click the combobox with selenium it creates an absolute positioned list, where i want to click an item.
But the list is positioned absolute out of the screen (because the combobox is scrollen on the bottom of the screen)
now i want to click an item
driver.findElement(element).click();
but the click gets an timeout
org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
when moving the item into view with firefox (hit F12, locate element, change top-css-value to 0) the test continues correctly
any idea how to click such an element?
ok found a working solution
((JavascriptExecutor) driver).executeScript("arguments[0].click();", driver.findElement(element));

Celerity - Help with popup_browser select list that updates div text on main browser

I'm screen scraping a page that includes a link that spawns a popup window that is comprised of a select list and a button to execute your selection. The objective is to click the link on the main page, make a selection on the pop-up window, click the link to confirm the selection and then view the new selection on the main webpage.
Here are the steps that I'm taking in Celerity and the results:
popup_browser = browser.image(:alt, 'Holidays').click_and_attach
#this creates a new browser to deal with the popup window
popup_browser.select_list(:id, 'ddlSlot1').select_value('Christmas')
#Selecting Christmas from the select list
popup_browser.link(:id, 'btnChangeHoliday').click
#Confirms/Implements selection
popup_browser.close
#Closes popup browser
puts browser.div(:id, 'HolidayName').text
#Here I try to print the updated holiday but nothing is printed (no text value)
Everything seems to work fine except for the last line. I've done some debugging and have confirmed that my selection has been made. It seems that the main webpage is not being updated after I click the ChangeHoliday button on the popup page.
Any thoughts or suggestions would be appreciated.
Thanks in advance for you help.
This turned out to be an easy fix. The only change required for the script to work is to add the resynchronize option to the browser initialization. After doing so the script works as expected.
browser = Celerity::IE.new(:resynchronize => true)

Resources