Name clashes issue

I am trying to debug the attached web page. When I automate the selection of the drop-downs, I get four objects named select_ctl00ContentPlaceHolder. And the automation script can’t tell the objects apart. Can you suggest a work around?

Steve Tousignant

Core Development Team | MPCA Development

Minnesota IT Services | Partnering with the MN Pollution Control Agency

520 Lafayette Road N

St. Paul, MN,55155-4194

O: 651.757.2209

C: 952.380.6470

Information Technology for Minnesota Government | mn.gov/mnit

I am trying to debug the attached web page. When I automate the selection of the drop-downs, I get four objects named select_ctl00ContentPlaceHolder. And the automation script can’t tell the objects apart. Can you suggest a work around?

Steve Tousignant

Core Development Team | MPCA Development

Minnesota IT Services | Partnering with the MN Pollution Control Agency

520 Lafayette Road N

St. Paul, MN,55155-4194

O: 651.757.2209

C: 952.380.6470

Information Technology for Minnesota Government | mn.gov/mnit

Minnesota IT Services Logo

Facebook logoLinkedIn logoTwitter logo

Hi there,

Based on what you’ve written, what you mean is when it comes to ‘find element’ step then 4 elements will be found using properties defined in ‘select_ctl00ContentPlaceHolder’ object, is that correct?
If so you just only need to adjust that test object, can I have a look at this object?

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO

Thank you for helping me with this. My test case is attached.

Thank you

Steve Tousignant

Core Development Team | MPCA Development

Minnesota IT Services
| Partnering with the MN Pollution Control Agency

520 Lafayette Road N

St. Paul, MN,55155-4194

O: 651.757.2209

C: 952.380.6470

Information Technology for Minnesota Government | mn.gov/mnit

Minnesota IT Services Logo

Facebook logoLinkedIn logoTwitter logo

Hi there,

That file does not help much. Can you help to zip the whole project and send me instead?

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO

Thanks, Here’s a very simple project.

Steve Tousignant

Core Development Team | MPCA Development

Minnesota IT Services
| Partnering with the MN Pollution Control Agency

520 Lafayette Road N

St. Paul, MN,55155-4194

O: 651.757.2209

C: 952.380.6470

Information Technology for Minnesota Government | mn.gov/mnit

Minnesota IT Services Logo

Facebook logoLinkedIn logoTwitter logo

Ah I also need your execution logs from this test case. I can’t access this site: http://carl-dev/streams.aspx however. Can you help to re-execute your test case and send me execution logs?

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO

Where do I find the logs?

Steve Tousignant

Core Development Team | MPCA Development

Minnesota IT Services
| Partnering with the MN Pollution Control Agency

520 Lafayette Road N

St. Paul, MN,55155-4194

O: 651.757.2209

C: 952.380.6470

Information Technology for Minnesota Government | mn.gov/mnit

Minnesota IT Services Logo

Facebook logoLinkedIn logoTwitter logo

Hi there,

Execution logs are available in ‘Console’ view as you can see in my attached picture.

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO

Ok, Sorry for the confusion. Here’s the output:

08-14-2017 11:49:22 AM - [START] - Start Test Case : Test Cases/New Test Case

08-14-2017 11:49:22 AM - [INFO] - Evaluating variables for test case

08-14-2017 11:49:23 AM - [START] - Start action : openBrowser

08-14-2017 11:49:24 AM - [INFO] - Opening browser

08-14-2017 11:49:24 AM - [INFO] - Starting ‘Firefox’ driver

08-14-2017 11:49:26 AM - [INFO] - Action delay is set to 0 seconds

08-14-2017 11:49:37 AM - [RUN_DATA] - Logging run data ‘sessionId’ with value ‘b1f7a5ca-375f-4774-a2ae-64a49ac3f5a2’

08-14-2017 11:49:38 AM - [PASSED] - Browser is opened with url: ‘’

08-14-2017 11:49:38 AM - [END] - End action : openBrowser

08-14-2017 11:49:38 AM - [START] - Start action : navigateToUrl

08-14-2017 11:49:38 AM - [RUN_DATA] - Logging run data ‘browser’ with value ‘Firefox 52.0’

08-14-2017 11:49:38 AM - [RUN_DATA] - Logging run data ‘platform’ with value ‘Windows 7’

08-14-2017 11:49:38 AM - [RUN_DATA] - Logging run data ‘seleniumVersion’ with value ‘2.53.0’

08-14-2017 11:49:38 AM - [RUN_DATA] - Logging run data ‘proxyInformation’ with value ‘ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=,
proxyServerPort=0}’

08-14-2017 11:49:38 AM - [INFO] - Checking url

08-14-2017 11:49:38 AM - [INFO] - Navigating to ‘http://carl-dev/streams.aspx’

08-14-2017 11:50:21 AM - [PASSED] - Navigate to ‘http://carl-dev/streams.aspx’ successfully

08-14-2017 11:50:21 AM - [END] - End action : navigateToUrl

08-14-2017 11:50:21 AM - [START] - Start action : selectOptionByValue

08-14-2017 11:50:21 AM - [INFO] - Finding Test Object with id ‘Object Repository/Page_MPCA - CARL/select_ctl00ContentPlaceHolder’

08-14-2017 11:50:21 AM - [INFO] - Checking object

08-14-2017 11:50:21 AM - [INFO] - Checking value parameter

08-14-2017 11:50:21 AM - [INFO] - Checking timeout

08-14-2017 11:50:21 AM - [INFO] - Finding web element with id: ‘Object Repository/Page_MPCA - CARL/select_ctl00ContentPlaceHolder’ located by ‘By.xpath: //select[count(.
| id(“ContentPlaceHolder1_ucSelect_ddlAssessYear”)) = count(id(“ContentPlaceHolder1_ucSelect_ddlAssessYear”))]’ in ‘30’ second(s)

08-14-2017 11:50:21 AM - [INFO] - Found 1 web elements with id: ‘Object Repository/Page_MPCA - CARL/select_ctl00ContentPlaceHolder’ located by ‘By.xpath: //select[count(.
| id(“ContentPlaceHolder1_ucSelect_ddlAssessYear”)) = count(id(“ContentPlaceHolder1_ucSelect_ddlAssessYear”))]’ in ‘30’ second(s)

08-14-2017 11:50:21 AM - [INFO] - Selecting options on object ‘Object Repository/Page_MPCA - CARL/select_ctl00ContentPlaceHolder’ with value ‘2006’ using regular
expression

08-14-2017 11:50:22 AM - [INFO] - Option at index ‘7’ with value ‘2006’ is selected using regular expression

08-14-2017 11:50:25 AM - [FAILED] - Unable to select option by value ‘2006’ of object ‘Object Repository/Page_MPCA - CARL/select_ctl00ContentPlaceHolder’ using regular
expression (Root cause: org.openqa.selenium.StaleElementReferenceException: Element not found in the cache - perhaps the page has changed since
it was looked up

Command duration or timeout: 3.70 seconds

For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html

Build info: version: ‘2.53.0’, revision: ‘35ae25b’, time: ‘2016-03-15 17:00:58’

System info: host: ‘W7-1685586’, ip: ‘10.72.11.23’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_102’

Driver info: com.kms.katalon.core.webui.driver.firefox.CFirefoxDriver47

Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=52.3.0, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true,
webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]

Session ID: b1f7a5ca-375f-4774-a2ae-64a49ac3f5a2)

08-14-2017 11:50:25 AM - [FAILED] - Test Cases/New Test Case FAILED because (of) Unable to select option by value ‘2006’ of object ‘Object Repository/Page_MPCA - CARL/select_ctl00ContentPlaceHolder’
using regular expression (Root cause: org.openqa.selenium.StaleElementReferenceException: Element not found in the cache - perhaps the page has
changed since it was looked up

Command duration or timeout: 3.70 seconds

For documentation on this error, please visit: http://seleniumhq.org/exceptions/stale_element_reference.html

Build info: version: ‘2.53.0’, revision: ‘35ae25b’, time: ‘2016-03-15 17:00:58’

System info: host: ‘W7-1685586’, ip: ‘10.72.11.23’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_102’

Driver info: com.kms.katalon.core.webui.driver.firefox.CFirefoxDriver47

Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=52.3.0, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true,
webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]

Session ID: b1f7a5ca-375f-4774-a2ae-64a49ac3f5a2)

08-14-2017 11:50:25 AM - [END] - End action : selectOptionByValue

08-14-2017 11:50:25 AM - [END] - End Test Case : Test Cases/New Test Case

Steve Tousignant

Core Development Team | MPCA Development

Minnesota IT Services
| Partnering with the MN Pollution Control Agency

520 Lafayette Road N

St. Paul, MN,55155-4194

O: 651.757.2209

C: 952.380.6470

Information Technology for Minnesota Government | mn.gov/mnit

Minnesota IT Services Logo

Facebook logoLinkedIn logoTwitter logo

Hi there,

Looks like your web application is rebuilt after selecting the value in the dropdown, therefore our keyword can’t complete selecting step: “Element not found in the cache - perhaps the page has changed since it was looked up”

The below script will select an item based on its displayed text, can you just try changing ‘Select’ step to the following :

WebElement select = WebUiCommonHelper.findWebElement(findTestObject(‘your/object’), 30)
List options = select.findElements(By.tagName(“option”));
for(WebElement option : options){
if(option.getText().equals(“Name you want”)) {
option.click();
break;
}
}

Thanks

____________________
Thank you for choosing Katalon Studio as your automation solution.
Your feedback is needed to make Katalon Studio a better tool, take the survey at: https://goo.gl/S25NVO