How to SelectFrame dynamically in Salesforce?Access frame via “relative=up” with Selenium & RubyHow can I match on an attribute that contains a certain string?How to implement pagination in salesforcehow to upload packages in salesforceSalesforce: How to notify a userWhat is a dynamic apex in salesforce?how to handle salesforce hover in seleniumSalesForce dynamic triggers (callbacks)How to get XPath of an element when it is in sub tab (Salesforce Lightning component)how to delete Packages in salesforce?Xpath for dynamic select menus
Could you sell yourself into slavery in the USA?
In the Seventh Seal why does Death let the chess game happen?
Did Snape really give Umbridge a fake Veritaserum potion that Harry later pretended to drink?
Was Wolfgang Unzicker the last Amateur GM?
Can a Time Lord survive with just one heart?
What is the difference between a historical drama and a period drama?
Should I hide my travel history to the UK when I apply for an Australian visa?
Show that there are infinitely more problems than we will ever be able to compute
Why does the Batman "crack his knuckles" in "Batman: Arkham Origins"?
Should I increase my 401(k) contributions, or increase my mortgage payments
How to travel between two stationary worlds in the least amount of time? (time dilation)
Why did moving the mouse cursor cause Windows 95 to run more quickly?
Why did the "Orks" never develop better firearms than Firelances and Handcannons?
Do intermediate subdomains need to exist?
Why did C++11 make std::string::data() add a null terminating character?
Did Stalin kill all Soviet officers involved in the Winter War?
What instances can be solved today by modern solvers (pure LP)?
Creating patterns
Explain how 'Sharing the burden' puzzle from Professor Layton and the Miracle Mask should be solved
How to respond to someone who condemns behavior similar to what they exhibit?
Who pays for increased security measures on flights to the US?
How should I present a resort brochure in my general fiction?
Are "confidant" and "confident" homophones?
How can I define a very large matrix efficiently?
How to SelectFrame dynamically in Salesforce?
Access frame via “relative=up” with Selenium & RubyHow can I match on an attribute that contains a certain string?How to implement pagination in salesforcehow to upload packages in salesforceSalesforce: How to notify a userWhat is a dynamic apex in salesforce?how to handle salesforce hover in seleniumSalesForce dynamic triggers (callbacks)How to get XPath of an element when it is in sub tab (Salesforce Lightning component)how to delete Packages in salesforce?Xpath for dynamic select menus
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to automate a script using Kantu in Salesforce.
Basically I am going through some dropdown IDs and select the right values and everything works IF the selectFrame value is correct in the beginning.
The problem is that Salesforce refreshes the iframe ID everytime the page is refreshed or a new case is opened (i.e. ext-comp-1018 | ext-comp-1035 | ext-comp-1048 etc.)
Because the script does not recognize the frame (since it is always changing), it won't go ahead to do the rest of the actions.
{
"Name": "SFDC_Auto",
"CreationDate": "2019-3-25",
"Commands": [
"Command": "selectFrame",
"Target": "id=ext-comp-1018",
"Value": ""
,
"Command": "select",
"Target": "id=cas5",
"Value": "label=Escalation"
,
I seen a post that mentioned this would be the solution, but I am not sure how to implement it in Kantu:
frames = @driver.find_elements(:xpath, '//iframe[starts-with(@id,ext-
comp-)]') @driver.switch_to.frame frames1
So far I could make this work: xpath=//iframe[starts-with(@id,ext-comp-)], however it doesn't do nothing. It reads ok but then halts at the next step saying that ID CAS5 is not recognized.
Can anyone help out?
Thanks,
selenium xpath salesforce kantu
|
show 3 more comments
I am trying to automate a script using Kantu in Salesforce.
Basically I am going through some dropdown IDs and select the right values and everything works IF the selectFrame value is correct in the beginning.
The problem is that Salesforce refreshes the iframe ID everytime the page is refreshed or a new case is opened (i.e. ext-comp-1018 | ext-comp-1035 | ext-comp-1048 etc.)
Because the script does not recognize the frame (since it is always changing), it won't go ahead to do the rest of the actions.
{
"Name": "SFDC_Auto",
"CreationDate": "2019-3-25",
"Commands": [
"Command": "selectFrame",
"Target": "id=ext-comp-1018",
"Value": ""
,
"Command": "select",
"Target": "id=cas5",
"Value": "label=Escalation"
,
I seen a post that mentioned this would be the solution, but I am not sure how to implement it in Kantu:
frames = @driver.find_elements(:xpath, '//iframe[starts-with(@id,ext-
comp-)]') @driver.switch_to.frame frames1
So far I could make this work: xpath=//iframe[starts-with(@id,ext-comp-)], however it doesn't do nothing. It reads ok but then halts at the next step saying that ID CAS5 is not recognized.
Can anyone help out?
Thanks,
selenium xpath salesforce kantu
1
Please make a reference to the post you mentioned
– N8888
Mar 25 at 19:06
you missed single quotes aroundext-comp-
the xpath should be//iframe[contains(@id,'ext-comp-')]
– supputuri
Mar 25 at 19:20
If you want to use css then@driver.find_elements(:css, "iframe[id^='ext- comp-']")
is the correct one.
– supputuri
Mar 25 at 19:24
@supputuri, this is what I get when I run those: Code: //iframe[contains(@id,'ext-comp-')] Output: [error] timeout reached when looking for element 'id=cas5' [error] Code: @driver.find_elements(:css, "iframe[id^='ext- comp-']") Output: [error] timeout reached when looking for frame '@driver.find_elements(:css, "iframe[id^='ext- comp-']")'
– Slider105
Mar 25 at 19:36
@N8888 this was the one: stackoverflow.com/questions/44897298/…
– Slider105
Mar 25 at 19:37
|
show 3 more comments
I am trying to automate a script using Kantu in Salesforce.
Basically I am going through some dropdown IDs and select the right values and everything works IF the selectFrame value is correct in the beginning.
The problem is that Salesforce refreshes the iframe ID everytime the page is refreshed or a new case is opened (i.e. ext-comp-1018 | ext-comp-1035 | ext-comp-1048 etc.)
Because the script does not recognize the frame (since it is always changing), it won't go ahead to do the rest of the actions.
{
"Name": "SFDC_Auto",
"CreationDate": "2019-3-25",
"Commands": [
"Command": "selectFrame",
"Target": "id=ext-comp-1018",
"Value": ""
,
"Command": "select",
"Target": "id=cas5",
"Value": "label=Escalation"
,
I seen a post that mentioned this would be the solution, but I am not sure how to implement it in Kantu:
frames = @driver.find_elements(:xpath, '//iframe[starts-with(@id,ext-
comp-)]') @driver.switch_to.frame frames1
So far I could make this work: xpath=//iframe[starts-with(@id,ext-comp-)], however it doesn't do nothing. It reads ok but then halts at the next step saying that ID CAS5 is not recognized.
Can anyone help out?
Thanks,
selenium xpath salesforce kantu
I am trying to automate a script using Kantu in Salesforce.
Basically I am going through some dropdown IDs and select the right values and everything works IF the selectFrame value is correct in the beginning.
The problem is that Salesforce refreshes the iframe ID everytime the page is refreshed or a new case is opened (i.e. ext-comp-1018 | ext-comp-1035 | ext-comp-1048 etc.)
Because the script does not recognize the frame (since it is always changing), it won't go ahead to do the rest of the actions.
{
"Name": "SFDC_Auto",
"CreationDate": "2019-3-25",
"Commands": [
"Command": "selectFrame",
"Target": "id=ext-comp-1018",
"Value": ""
,
"Command": "select",
"Target": "id=cas5",
"Value": "label=Escalation"
,
I seen a post that mentioned this would be the solution, but I am not sure how to implement it in Kantu:
frames = @driver.find_elements(:xpath, '//iframe[starts-with(@id,ext-
comp-)]') @driver.switch_to.frame frames1
So far I could make this work: xpath=//iframe[starts-with(@id,ext-comp-)], however it doesn't do nothing. It reads ok but then halts at the next step saying that ID CAS5 is not recognized.
Can anyone help out?
Thanks,
selenium xpath salesforce kantu
selenium xpath salesforce kantu
edited Mar 25 at 19:59
Slider105
asked Mar 25 at 19:02
Slider105Slider105
302 silver badges8 bronze badges
302 silver badges8 bronze badges
1
Please make a reference to the post you mentioned
– N8888
Mar 25 at 19:06
you missed single quotes aroundext-comp-
the xpath should be//iframe[contains(@id,'ext-comp-')]
– supputuri
Mar 25 at 19:20
If you want to use css then@driver.find_elements(:css, "iframe[id^='ext- comp-']")
is the correct one.
– supputuri
Mar 25 at 19:24
@supputuri, this is what I get when I run those: Code: //iframe[contains(@id,'ext-comp-')] Output: [error] timeout reached when looking for element 'id=cas5' [error] Code: @driver.find_elements(:css, "iframe[id^='ext- comp-']") Output: [error] timeout reached when looking for frame '@driver.find_elements(:css, "iframe[id^='ext- comp-']")'
– Slider105
Mar 25 at 19:36
@N8888 this was the one: stackoverflow.com/questions/44897298/…
– Slider105
Mar 25 at 19:37
|
show 3 more comments
1
Please make a reference to the post you mentioned
– N8888
Mar 25 at 19:06
you missed single quotes aroundext-comp-
the xpath should be//iframe[contains(@id,'ext-comp-')]
– supputuri
Mar 25 at 19:20
If you want to use css then@driver.find_elements(:css, "iframe[id^='ext- comp-']")
is the correct one.
– supputuri
Mar 25 at 19:24
@supputuri, this is what I get when I run those: Code: //iframe[contains(@id,'ext-comp-')] Output: [error] timeout reached when looking for element 'id=cas5' [error] Code: @driver.find_elements(:css, "iframe[id^='ext- comp-']") Output: [error] timeout reached when looking for frame '@driver.find_elements(:css, "iframe[id^='ext- comp-']")'
– Slider105
Mar 25 at 19:36
@N8888 this was the one: stackoverflow.com/questions/44897298/…
– Slider105
Mar 25 at 19:37
1
1
Please make a reference to the post you mentioned
– N8888
Mar 25 at 19:06
Please make a reference to the post you mentioned
– N8888
Mar 25 at 19:06
you missed single quotes around
ext-comp-
the xpath should be //iframe[contains(@id,'ext-comp-')]
– supputuri
Mar 25 at 19:20
you missed single quotes around
ext-comp-
the xpath should be //iframe[contains(@id,'ext-comp-')]
– supputuri
Mar 25 at 19:20
If you want to use css then
@driver.find_elements(:css, "iframe[id^='ext- comp-']")
is the correct one.– supputuri
Mar 25 at 19:24
If you want to use css then
@driver.find_elements(:css, "iframe[id^='ext- comp-']")
is the correct one.– supputuri
Mar 25 at 19:24
@supputuri, this is what I get when I run those: Code: //iframe[contains(@id,'ext-comp-')] Output: [error] timeout reached when looking for element 'id=cas5' [error] Code: @driver.find_elements(:css, "iframe[id^='ext- comp-']") Output: [error] timeout reached when looking for frame '@driver.find_elements(:css, "iframe[id^='ext- comp-']")'
– Slider105
Mar 25 at 19:36
@supputuri, this is what I get when I run those: Code: //iframe[contains(@id,'ext-comp-')] Output: [error] timeout reached when looking for element 'id=cas5' [error] Code: @driver.find_elements(:css, "iframe[id^='ext- comp-']") Output: [error] timeout reached when looking for frame '@driver.find_elements(:css, "iframe[id^='ext- comp-']")'
– Slider105
Mar 25 at 19:36
@N8888 this was the one: stackoverflow.com/questions/44897298/…
– Slider105
Mar 25 at 19:37
@N8888 this was the one: stackoverflow.com/questions/44897298/…
– Slider105
Mar 25 at 19:37
|
show 3 more comments
1 Answer
1
active
oldest
votes
The problem is that Salesforce refreshes the iframe ID
In addition to the iframe ID you can also use the iframe index=0 (or 1,2,..) in select frame. This should stay constant even if the ID is changing:
open | https://a9t9.com/kantu/demo/iframes
selectFrame | relative=top
selectFrame | index=0
click | css=button.ytp-large-play-button.ytp-button
As an alternative solution, have you considered using XClick (image)
or XClick (ocr=text)
. Since these commands work visually, this avoids finding the right iframe ;-)
Here is a forum post that uses this method to solve a click on a Youtube video inside an iframe:
https://forum.a9t9.com/t/embedded-video-problem/1324/2
Screencast:
https://www.youtube.com/watch?v=4aNs9BnsodA
The third method would be to use sourceExtract
to find the new frame ID in the source code, extract it, and then use it as input for selectFrame. But the first suggestion is much easier and should work.
1
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55344813%2fhow-to-selectframe-dynamically-in-salesforce%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is that Salesforce refreshes the iframe ID
In addition to the iframe ID you can also use the iframe index=0 (or 1,2,..) in select frame. This should stay constant even if the ID is changing:
open | https://a9t9.com/kantu/demo/iframes
selectFrame | relative=top
selectFrame | index=0
click | css=button.ytp-large-play-button.ytp-button
As an alternative solution, have you considered using XClick (image)
or XClick (ocr=text)
. Since these commands work visually, this avoids finding the right iframe ;-)
Here is a forum post that uses this method to solve a click on a Youtube video inside an iframe:
https://forum.a9t9.com/t/embedded-video-problem/1324/2
Screencast:
https://www.youtube.com/watch?v=4aNs9BnsodA
The third method would be to use sourceExtract
to find the new frame ID in the source code, extract it, and then use it as input for selectFrame. But the first suggestion is much easier and should work.
1
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
|
show 2 more comments
The problem is that Salesforce refreshes the iframe ID
In addition to the iframe ID you can also use the iframe index=0 (or 1,2,..) in select frame. This should stay constant even if the ID is changing:
open | https://a9t9.com/kantu/demo/iframes
selectFrame | relative=top
selectFrame | index=0
click | css=button.ytp-large-play-button.ytp-button
As an alternative solution, have you considered using XClick (image)
or XClick (ocr=text)
. Since these commands work visually, this avoids finding the right iframe ;-)
Here is a forum post that uses this method to solve a click on a Youtube video inside an iframe:
https://forum.a9t9.com/t/embedded-video-problem/1324/2
Screencast:
https://www.youtube.com/watch?v=4aNs9BnsodA
The third method would be to use sourceExtract
to find the new frame ID in the source code, extract it, and then use it as input for selectFrame. But the first suggestion is much easier and should work.
1
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
|
show 2 more comments
The problem is that Salesforce refreshes the iframe ID
In addition to the iframe ID you can also use the iframe index=0 (or 1,2,..) in select frame. This should stay constant even if the ID is changing:
open | https://a9t9.com/kantu/demo/iframes
selectFrame | relative=top
selectFrame | index=0
click | css=button.ytp-large-play-button.ytp-button
As an alternative solution, have you considered using XClick (image)
or XClick (ocr=text)
. Since these commands work visually, this avoids finding the right iframe ;-)
Here is a forum post that uses this method to solve a click on a Youtube video inside an iframe:
https://forum.a9t9.com/t/embedded-video-problem/1324/2
Screencast:
https://www.youtube.com/watch?v=4aNs9BnsodA
The third method would be to use sourceExtract
to find the new frame ID in the source code, extract it, and then use it as input for selectFrame. But the first suggestion is much easier and should work.
The problem is that Salesforce refreshes the iframe ID
In addition to the iframe ID you can also use the iframe index=0 (or 1,2,..) in select frame. This should stay constant even if the ID is changing:
open | https://a9t9.com/kantu/demo/iframes
selectFrame | relative=top
selectFrame | index=0
click | css=button.ytp-large-play-button.ytp-button
As an alternative solution, have you considered using XClick (image)
or XClick (ocr=text)
. Since these commands work visually, this avoids finding the right iframe ;-)
Here is a forum post that uses this method to solve a click on a Youtube video inside an iframe:
https://forum.a9t9.com/t/embedded-video-problem/1324/2
Screencast:
https://www.youtube.com/watch?v=4aNs9BnsodA
The third method would be to use sourceExtract
to find the new frame ID in the source code, extract it, and then use it as input for selectFrame. But the first suggestion is much easier and should work.
edited Mar 26 at 0:05
answered Mar 25 at 23:51
Jim GrigoryanJim Grigoryan
1,0751 gold badge2 silver badges8 bronze badges
1,0751 gold badge2 silver badges8 bronze badges
1
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
|
show 2 more comments
1
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
1
1
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
For some reason the frame index was changing every time OP load the page, so could not hard code the index. I think he already tried xClick option too. I had a discussion so, just sharing the info what we tried.
– supputuri
Mar 26 at 3:13
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Interesting. Then another solution could be to use store | true | !errorignore and test different frame indexes inside the macro to find the one that works.
– Jim Grigoryan
Mar 26 at 10:15
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
Hi Jim, thanks for the options. The Index keeps changing, although in the source code its always the 4th iframe, using index=4 does not work consistently. Tried to do a while loop using !errorignore with supputuri but it takes a long time just to identify the frame and doesnt seem to work quite effectively. is there a way to identify the frame with the xclick image/ocr and then run the script as normal?
– Slider105
Mar 29 at 10:07
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
do you have a public website where I could test this?
– Jim Grigoryan
Mar 29 at 10:14
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
I don't Jim. But I found that running the automation on selenium IDE, the index=0,1,2,3 actually works and so far have done over a dozen of tests and it seems constant! So wonder if the issue was due to something buggy going on with Kantu. Even replicating the same steps in the script, selenium works, kantu doesnt.
– Slider105
Mar 29 at 15:37
|
show 2 more comments
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55344813%2fhow-to-selectframe-dynamically-in-salesforce%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Please make a reference to the post you mentioned
– N8888
Mar 25 at 19:06
you missed single quotes around
ext-comp-
the xpath should be//iframe[contains(@id,'ext-comp-')]
– supputuri
Mar 25 at 19:20
If you want to use css then
@driver.find_elements(:css, "iframe[id^='ext- comp-']")
is the correct one.– supputuri
Mar 25 at 19:24
@supputuri, this is what I get when I run those: Code: //iframe[contains(@id,'ext-comp-')] Output: [error] timeout reached when looking for element 'id=cas5' [error] Code: @driver.find_elements(:css, "iframe[id^='ext- comp-']") Output: [error] timeout reached when looking for frame '@driver.find_elements(:css, "iframe[id^='ext- comp-']")'
– Slider105
Mar 25 at 19:36
@N8888 this was the one: stackoverflow.com/questions/44897298/…
– Slider105
Mar 25 at 19:37