Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Use of _near and _under

sahiuser1sahiuser1 Members
edited January 2014 in Sahi - Open Source
Hi sir,
If i use _cell(0,_near(_cell("python cookbook")),_under(_cell("Cost")));
will it point to Rs 350 or Rs 300 of core java
Currently it is pointing to Rs 350 of python cookbook.
But similarly,
if i use _cell(0,_near(_cell("Python cookbook")),_under(_cell("Quantity")));
it is pointing to 4 which i gave the quantity to core java

can you spot me the difference between these two?

Best Answer

  • Hi sahiuser1,

    _cell("Python Cookbook") is being indexed on the page because is appears two times on the page. So it is identifying the element whis is near to _cell("Python Cookbook").But I think the element you are looking for is different ie _cell("Python Cookbook[1]"). So try it out.



  • @sahiuser1,
    essentially JavaScript syntax, no?
    so "python cookbook" != "Python cookbook"
    Let me stop there before I expose my ignorance of the internals...
  • globalwormingglobalworming Moderators
    edited January 2014
    orpac7 seems right, so why do you reject the answer?
    Well it's not fully answerd..
    _cell(0,_near(_cell("python cookbook")),_under(_cell("Cost")));
    _cell(0,_near(_cell("Python cookbook")),_under(_cell("Quantity")));
    the difference is in "phyton cookbock" and in the _under() values "Cost" and "Quantity"
  • sahiuser1sahiuser1 Members
    edited January 2014
    Hi global
    Im not telling about Python cookbook.The letter p is capital in both statements.what i told is that when i used the first ie _cell(0,_near(_cell("Python cookbook")),_under(_cell("Cost"))); it is pointing to the cost Rs 350 that is of Python cookbook thats right.Similarly when i use the second statement _cell(0,_near(_cell("Python cookbook")),_under(_cell("Quantity")));,then it shows the quantity of core java.i intended to display the cost of python coz i gave python cookbook in the _near statement
  • hi sachin_tyto,
    Now its work fine

    Many many thanks
Sign In or Register to comment.