Not being able to click on visible element in a input datepicker field with selenium webdriver 3 - webdriver

In the Expedia.com, on flights section, there're two inputs (departing and returning) for handle dates.
I'm not being able to get the right element so that I can click and sendKeys to it. I've tried many types and only using the place holder it works for returning input, but not for departing.
I'm using this: #FindBy (xpath = "//input[#placeholder='City or airport']") but it's clicking on the returning instead of departing.
So, what can I put in this locator so that I can get the right one? I've tried also with index [1] or [2] but didn't worked as well.

In case you want to insert the Departing date the input can be selected by #flight-departing-flp
Flight returning input element can be selected by #flight-returning-flp
Flying from airport field can be selected //input[#data-airport_code_element="flight-origin-flp-airport_code"] etc.

Related

VLOOKUP for Octoparse to extract data

I have an issue that is quite complex to solve using Octoparse. Let's say we have a value extracted from one page, let's call that value as ID. Then we have a pop-up window that shows up when you click on a button that is on a different page. The pop-up window contains a table with different IDs in one column and links in another column. I want Octoparse to compare unique ID from the very first page with different IDs in the popup window, find the match (IDs are all unique, but only one matches), and extract the link right next to it (in the second column). Basically, it sounds like using a vlooukup function in Excel. Is this possible? Can you help me out with that, please?
Maybe there's a way to solve this issue using XPath, I don't know.
I couldn't solve this issue using Octoparse.

Regex Table Lookup not working with Click Element variable

I have created a regex lookup table variable to output text based on the Click Element containing a specific string. However, the variable appears as null despite the string definitely being in the Click Element. Can anyone help?
Here is my regex lookup table variable
Here is the debug window showing null (the Action field is where the regex table variable should populate)
Here is the full tag that contains the variable
Here is the trigger for the tag
I have tried various different strings from the Click Element, without luck.
The trigger for the tag is based on the same string, and the trigger works, which only adds to my confusion.
I feel like the problem must be obvious, but I'm at a loss.
I struggled with this as well until I realized that "Click Element" is actually an object, not a string. It's based on gtm.element in the datalayer.
So, in order to do this you'll need to create a custom datalayer variable that more accurately targets a specific child key.
To see what I mean, open a link in a new tab and then type in datalayer into your browser console, and press enter. You'll see something like:
3:
event: "gtm.click"
gtm.element: a#mylinkclass.my-class.something.else
accessKey: ""
ariaAtomic: null
ariaAutoComplete: null
ariaBusy: null
ariaChecked: null
ariaColCount: null
ariaColIndex: null
etc....
Screenshot of chrome inspector console showing datalayer children
So, then you'll have to create custom variable to target the key you'd like. For example, a datalayer variable that you create with gtm.element.className would return my-class something else for link Link Text.
Using this method I was able to create a Regex lookup table just like you're trying to do.
Here's a post that goes into some more detail on some of the above:
https://www.analyticsmania.com/post/click-element-variable-in-google-tag-manager/

select date field from SQL datasource in appmaker based on drop down value

I can not post a comment to another question that exists out there, so I am asking my own question. I have a drop down, that consists of "employee name". I want a date box to auto-populate based on the result of the name selected. I.E. John Smith is selected and his DOB is 01/02/1987, I want this second box to return 01/02/1987.
Things I have tried:
Server side script function, calling function -- RESULT: Function not found
Client side script function, Calling function -- RESULT: function found, but can't find references to datasources
On another post, someone recommended doing options in the dropdown to being #datasources.Events.items and then the onChangeEvent being widget.root.descendants.DateBox1.value = newValue.Date;
I have tried this, however, I can not stop the "options" at "items". I am required to proceed through to items.projects.fieldName. Since I am selecting the fieldName on requirement, the newValue isn't returning the date based off that field. It simply says "undefined value"
How should I populate one date box based on the result set of the dropdown box?

Issue with Finder in Drupal 7

So, I am using Drupal 7 and I'm having an issue with the Finder module.
I have a view set up with a list of a specific content type. In my Finder I have 2 select lists set up to filter the view, both with a blank option appended to the beginning, and also a text box.
When I view the page and select a value from either of the select lists the page works fine. The problem pops up when I leave both select lists blank and the text field empty. Instead of returning all results, which is the behavior I want, it return no results.
In the Finder module for my select lists I have 1 of the "Choices" set to Used Values and I have the field set to the correct content type I want to filter on. The 2nd Select List is set to "Available Options." Both Select Lists have the "Empty Choice" setting set to "empty."
If there is any other information I can provide, let me know.
This has been a very difficult bug to Google and I am hoping someone can point me in the right direction.
Answered.....Sort of.
The problem turns out to be version of WebForm module that is being used. We were using version 7.x-4.3, which is the latest, but rolled back to version 7.x-4.1 and the issue resolved itself.
It seems odd to me that a product that is used by hundreds of thousands of people would let a bug this annoying slip by.

Issue is clicking web-element in a table in qtp

I have a question in UFT 12.
My scenario is:
1. Type text in a WebEdit. Say "GOOG"
2. When I type "GOOG" slowly, it lists out the symbols that start with "G". From this list out, I want to select the first element.
3. Once I click on the first element, the Google quotes are displayed.
My Issue:
UFT just types GOOG and doesn't show me the list that lays out for me to select the first element that starts with "G".
From the Object spy, I managed to find the first element as a web element.
I tried many different ways like childitem etc. Nothing seems to work. Please help me out.
I am not able to attach my screen shot here. This is something similar to Google suggest where you type and it suggests you so many options and go with the first option.
It seems like you're trying to automate auto-complete textbox. So you should not directly paste the string value in the textbox as we used to do for normal edit controls, instead you should split the string into separate characters and type one by one.
If if you do in such a way, then the AUT will list the matching options to pick. From there you can select the required option. Then you may use SendKeys method (** something like Down Arrow + Enter) to pick the selection.
Just a have attempt in this way - good luck!

Resources