While testing the current portal, I encountered an issue where I couldn't create any xpath locators. After some investigation, I realized that the problem stemmed from an '#document' causing the path to be cut off and redirecting the "copy xpath" to a different element altogether.
<iframe id="FRAMENAME" src="/webclient/workspace/launch-task/REMbl?ds=BP" width="100%" height="100%" frameborder="0" data-navitemname="navitemname" style="" xpath="1">
#document
<html>
CODE....
</html>
To resolve this issue, I simply added a switchTo method like so:
driver.switchTo().frame("FRAMENAME");
Although this solution effectively allows the code to work properly, it does introduce a slight delay in processing the command before moving on to the next line.
Is there a more efficient or faster solution available for this problem? I am worried about potential slowdowns in execution time as my scripts become more numerous.
For example, I avoid using id locators due to their dynamic nature, which sometimes necessitates the use of xpath instead.
Thank you!