Hi Team,
Our development team is using SmartClient for development. So on every build component IDs are changing. To address that I am exploring this user-extension.js with hope that this will help us with dynamic id issue.
1. I read and understand that latest selenium doesn't support user-extension-ide.js. So I went back to firefor 52 ESR and selenium IDE 2.9. Was able to successfully import user-extension-ide.js and record on my application. Faced error while exporting the recorded sclocators script as Java / TestNG / WebDriver in Selenium IDE 2.9 with Firefox 52 ESR.
Error is
2. Do we have a sample piece of code which will demonstrate how to use user-extension.js in selenium 3.14 webdriver in eclipse ide?
3. Or do we have some webdriver.jar(replacement of user-extension.js) which I can import in java selenium automation to access sclocator class in my eclipse ide?
Our development team is using SmartClient for development. So on every build component IDs are changing. To address that I am exploring this user-extension.js with hope that this will help us with dynamic id issue.
1. I read and understand that latest selenium doesn't support user-extension-ide.js. So I went back to firefor 52 ESR and selenium IDE 2.9. Was able to successfully import user-extension-ide.js and record on my application. Faced error while exporting the recorded sclocators script as Java / TestNG / WebDriver in Selenium IDE 2.9 with Firefox 52 ESR.
Error is
public void test() throws Exception {
driver.get("http://localhost:8080/test.jsp?sc_selenium=true");
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//TabSet[ID="topTabSetNONE"]/tab[title=Rules||ID=RulesTab||index=2]/]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//TabSet[ID="topTabSetRules"]/tab[title=Charge%20Rule||ID=ChargeandRuleTab||index=1]/]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburNew[ID="chargerule_newButton"]/]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productTypeCode||title=Product%20Type||index=2||Class=SelectItem]/[icon="picker"]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productTypeCode||title=Product%20Type||index=2||Class=SelectItem]/pickList/body/row[value=BANKCHARGE||1]/col[fieldName=value||0]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productSubTypeCode||title=Product%20SubType||value=||index=4||Class=SelectItem]/[icon="picker"]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productSubTypeCode||title=Product%20SubType||value=||index=4||Class=SelectItem]/pickList/body/row[value=CUSTODY||1]/col[fieldName=value||0]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=chargeRuleType||title=Charge%20Rule%20Type||index=6||Class=SelectItem]/[icon="picker"]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=chargeRuleType||title=Charge%20Rule%20Type||index=6||Class=SelectItem]/pickList/body/row[value=BrokerFee||0]/col[fieldName=value||0]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=effectiveDate||title=Effective%20Date||index=3||Class=DateTimeItem]/item[name=dateTextField||title=Effective%20Date||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=effectiveDate||title=Effective%20Date||index=3||Class=DateTimeItem]/item[name=dateTextField||title=Effective%20Date||value=10%24fs%2412%24fs%242018||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=expirationDate||title=Expiry%20Date||index=5||Class=DateTimeItem]/item[name=dateTextField||title=Expiry%20Date||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=expirationDate||title=Expiry%20Date||index=5||Class=DateTimeItem]/item[name=dateTextField||title=Expiry%20Date||value=31%24fs%2412%24fs%242018||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburEdit[ID="chargerule_saveButton"]/]]
}
driver.get("http://localhost:8080/test.jsp?sc_selenium=true");
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//TabSet[ID="topTabSetNONE"]/tab[title=Rules||ID=RulesTab||index=2]/]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//TabSet[ID="topTabSetRules"]/tab[title=Charge%20Rule||ID=ChargeandRuleTab||index=1]/]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburNew[ID="chargerule_newButton"]/]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productTypeCode||title=Product%20Type||index=2||Class=SelectItem]/[icon="picker"]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productTypeCode||title=Product%20Type||index=2||Class=SelectItem]/pickList/body/row[value=BANKCHARGE||1]/col[fieldName=value||0]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productSubTypeCode||title=Product%20SubType||value=||index=4||Class=SelectItem]/[icon="picker"]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=productSubTypeCode||title=Product%20SubType||value=||index=4||Class=SelectItem]/pickList/body/row[value=CUSTODY||1]/col[fieldName=value||0]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=chargeRuleType||title=Charge%20Rule%20Type||index=6||Class=SelectItem]/[icon="picker"]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=chargeRuleType||title=Charge%20Rule%20Type||index=6||Class=SelectItem]/pickList/body/row[value=BrokerFee||0]/col[fieldName=value||0]]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=effectiveDate||title=Effective%20Date||index=3||Class=DateTimeItem]/item[name=dateTextField||title=Effective%20Date||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=effectiveDate||title=Effective%20Date||index=3||Class=DateTimeItem]/item[name=dateTextField||title=Effective%20Date||value=10%24fs%2412%24fs%242018||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=expirationDate||title=Expiry%20Date||index=5||Class=DateTimeItem]/item[name=dateTextField||title=Expiry%20Date||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburDynamicForm[ID="chargerule_editForm"]/item[name=expirationDate||title=Expiry%20Date||index=5||Class=DateTimeItem]/item[name=dateTextField||title=Expiry%20Date||value=31%24fs%2412%24fs%242018||index=0||Class=TextItem]/element]]
// ERROR: Caught exception [unknown command [waitForElementClickable]]
// ERROR: Caught exception [Error: unknown strategy [sclocator] for locator [scLocator=//ExcaliburEdit[ID="chargerule_saveButton"]/]]
}
2. Do we have a sample piece of code which will demonstrate how to use user-extension.js in selenium 3.14 webdriver in eclipse ide?
3. Or do we have some webdriver.jar(replacement of user-extension.js) which I can import in java selenium automation to access sclocator class in my eclipse ide?
Comment