Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.
Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com
Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com
way to identify only by class name?
I couldn't figure out a way to identify a node simply by class name. If there is a better way, please post some feedback.
I don't care if it is a div or a span, but if there is something on the page with a specific class name, the best solution I found was to use jquery:
_getText($(".className"))
Again, if there is a better way in sahi script, please update this post
I want something to the effect of
_node("classname")
I don't care if it is a div or a span, but if there is something on the page with a specific class name, the best solution I found was to use jquery:
_getText($(".className"))
Again, if there is a better way in sahi script, please update this post
I want something to the effect of
_node("classname")
Answers
"$" is not defined
so I wrote this as the alternative:
if(_exists(_div("class"))){
var $observedText = _getText(_div("class"));
}else if(_exists(_span("class"))){
var $observedText = _getText(_span("class"));
}else{
etc.