I am trying to create an automation tool to test a salesforce platform. When I try to create a new form, the text is displayed but it's really just an injection from Javascript. Is there any way to have the text not disappear? Here is what my IDE looks like so far
3 Answers
These are not JavaScripts. These are the locators of the particular element.
The 1st column is the action which is going to be performed. 2nd column is the locator to specify where it has to be done. 3rd column denotes the locators label. Generally when you record a script using IDE this is how it stores the value.
-
I agree with everything you've said, but to insert the text into the fields under Value, those are strings injected by javascript into the field. Is that correct? My problem is, those values for type are not saved when submitting the form. Commented Jun 20, 2018 at 17:59
-
There is a similar type of question which was asked previously. Please refer the below link for references. sqa.stackexchange.com/questions/7871/… Commented Jun 20, 2018 at 18:12
-
While this is definitely helpful for running scripts, it still does not solve my issue of the fields disappearing. I am trying to get the text to trigger the aria-required Commented Jun 20, 2018 at 18:25
This issue will occurs due to the following reasons.
Verify your firefox browser version and if it is the latest one then downgrade the browser version since selenium IDE has ended their support with firefox browser. From the version 55 selenium IDE will not support firefox. For references click here. (https://www.google.co.in/amp/s/seleniumhq.wordpress.com/2017/08/09/firefox-55-and-selenium-ide/amp/)
Selenium IDE has some probelms with 'typekeys' and this will not work.
Verify your page is generating dynamic Id's everytime when the page gets loaded. If random id gets generated then use different locators to send the text values.
In some cases, you may need to use simple"type" command to see the value of the field. Sometimes you need to use "typeKeys'.
Workaround:
Upgrade to Selenium Webdriver instead using IDE.
Please click here for more references.
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/2898
-
The answer is, Lightning has issues that prevent selenium from automation. If it were salesforce classic, it would not have an issue. Commented Jun 22, 2018 at 15:11
-
"Lightning has issues that prevent selenium from automation." => If so, then use the Kantu Selenium IDE, which has XClick and XType Sendkeys - these commands simulate native OS click and keyboard events Commented Nov 14, 2018 at 9:32
On your selenium IDE use the store text command and store it in a variable then call the variable this way ${variableName}
Command Target Value
store text //your_object storedText
echo ${storedText}