Automation data-change firing issue using Selenium, jQuery and RFT
Hey all I am using RFT in order to automate a page on a Pega website page. However, the automation doesn't seem to be able to fire off the change event of the input that I am inserting a string of text into. This input box seems to be located inside an iframe and perhaps this is the reason why its not firing the onchange event when losing focus on that input box?
RFT does use Selenium in their program to interact with the web page.
The html of the input box:
<input data-id="204083727717650" data-ctl="["TextInput"]" id="BBOX" maxlength="15" validationtype="required" value="" name="$PpyWorkPage$pBBOX$pBBOX" class="leftJustifyStyle" data-change="[["refresh", ["otherSection", "RecordInformation", "", "&=", "", "BBOXOnChange,", ":event", "", "pyWorkPage.BBOX" ] ]]" type="text">
The Selenium code I have tried is this:
driver.switchTo().frame(driver.findElement(By.name("PegaGadget"))); WebDriverWait wait = new WebDriverWait(driver, 10); wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("BBOX"))); final WebElement BBOXInputBox = driver.findElement(By.id("BBOX")); BBOXInputBox.click(); BBOXInputBox.click(); Thread.sleep(2000); BBOXInputBox.sendKeys("204083727717650"); Thread.sleep(2000); BBOXInputBox.sendKeys(Keys.TAB); Thread.sleep(2000); BBOXInputBox.sendKeys(Keys.BACK_SPACE); Thread.sleep(2000); BBOXInputBox.sendKeys("1"); Thread.sleep(200); BBOXInputBox.sendKeys(Keys.TAB); Thread.sleep(2000); Actions builder = new Actions(driver); builder.moveToElement(driver.findElement(By.id("FirstName_U")), 5, 5).click().build().perform(); driver.findElement(By.id("FirstName_U")).sendKeys("something");
And I am trying my best to find this function above in their 30 or so of .js files for any one page.
So someone more knowledgeable than I in the area of this type of coding in JS please set up and let me know what I should be looking for in the .js source code so that I can fire this change event manually within code.
It seems when I click on the text box, input a few letters and then either tab or click on another input box on that same form it fires some type of event/function that populates a label on the page.
What I have been looking for within the .js source code would be a function called refresh(...) or something along the lines of refresh: function(...)... or _refresh: function(...)... but I haven't been able to find anything that resembles the parameters its sending to that function.