File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed 
main/kotlin/com/luissoares 
test/kotlin/com/luissoares Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,10 @@ data class ByPlaceholderText(
2323                }
2424            }
2525        } ? :  regexText?.let  {
26+             val  regexContains =  Regex (" .*${regexText.pattern} .*" 
2627            getWebDriver(context).filterAll { element -> 
2728                element.getAttribute(" placeholder" 
28-                     ?.let (regexText ::matches)
29+                     ?.let (regexContains ::matches)
2930                    ? :  false 
3031            }
3132        }
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class ByPlaceholderTextTest {
5353        driver.getFromHtml(" <input placeholder='Username' />" 
5454
5555        val  result =  driver.findElement(
56-             ByPlaceholderText (regexText =  Regex (" .* user.* " IGNORE_CASE ))
56+             ByPlaceholderText (regexText =  Regex (" user" IGNORE_CASE ))
5757        )
5858
5959        assertEquals(" input" 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments