Skip to content

Commit 29abb31

Browse files
committed
remove png prefix
1 parent 987526d commit 29abb31

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/appium_lib_core/common/base/driver.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ def compare_images(mode: :matchFeatures, first_image:, second_image:, options: n
804804
# You can handle settings for the comparision following below.
805805
# @see https://github.com/appium/appium-base-driver/blob/master/lib/basedriver/device-settings.js#L6
806806
#
807-
# @param [String] png_img_path A path to a partial image you'd like to find
807+
# @param [String] img_path A path to a partial image you'd like to find
808808
#
809809
# @return [::Selenium::WebDriver::Element]
810810
#
@@ -814,8 +814,8 @@ def compare_images(mode: :matchFeatures, first_image:, second_image:, options: n
814814
# autoUpdateImageElementPosition: true })
815815
# e = @@driver.find_element_by_image './test/functional/data/test_element_image.png'
816816
#
817-
def find_element_by_image(png_img_path)
818-
template = Base64.encode64 File.read png_img_path
817+
def find_element_by_image(img_path)
818+
template = Base64.encode64 File.read img_path
819819
find_element :image, template
820820
end
821821

@@ -825,7 +825,7 @@ def find_element_by_image(png_img_path)
825825
# You can handle settings for the comparision following below.
826826
# @see https://github.com/appium/appium-base-driver/blob/master/lib/basedriver/device-settings.js#L6
827827
#
828-
# @param [String] png_img_path A path to a partial image you'd like to find
828+
# @param [String] img_path A path to a partial image you'd like to find
829829
#
830830
# @return [::Selenium::WebDriver::Element]
831831
#
@@ -836,8 +836,8 @@ def find_element_by_image(png_img_path)
836836
# e = @@driver.find_elements_by_image ['./test/functional/data/test_element_image.png']
837837
# e == [] # if the `e` is empty
838838
#
839-
def find_elements_by_image(png_img_path)
840-
template = Base64.encode64 File.read png_img_path
839+
def find_elements_by_image(img_path)
840+
template = Base64.encode64 File.read img_path
841841
find_elements :image, template
842842
end
843843
end # class Driver

0 commit comments

Comments
 (0)