Selenium C#SendKeys不发送字母符号

问题描述

我正在测试Web应用程序,需要隐藏侧边栏,但是此操作是通过按“ S”键执行的,但是chrome不会通过此键响应sendkey,但是会响应其他非字母组合(如果我发送退格键或/,则一切正常)。有没有一种方法可以模拟通过硒以其他方式按S键 我的尝试:

CREATE function [dbo].[GET_BC_SME_BO_FOR_DR_TEST](@bc_sme_bo VARCHAR(100),@activity_name VARCHAR(100),@activity_type varchar(100))
returns table 
return
(
    SELECT field1,field2,field3 
    FROM (
        select top 1 'BIA' as activity,IIF(@bc_sme_bo='BC',bc_coordinator_id,'') as field1,IIF(@bc_sme_bo='SME',sme_id,'') as field2,IIF(@bc_sme_bo='BO',business_owner_id,'') as field3
        from bcm_bia_department
        where bia_id in
            (
                select top 1 bcm_bia_department.bia_id 
                from bcm_bia_department 
                full join bcm_bia_department_history on bcm_bia_department.bia_id = bcm_bia_department_history.bia_id 
                where bcm_bia_department.bia_name=@activity_type or  bcm_bia_department_history.bia_name=@activity_type 
            )
        UNION ALL 
        select top 1,'BCP' as activity,bc_id,''),sme,'')
        from bcm_bcp
        where bcp_id in
            (
                select top 1 bcm_bcp.bcp_id 
                from bcm_bcp 
                full join bcm_bcp_history on bcm_bcp.bcp_id = bcm_bcp_history.bcp_id 
                where bcm_bcp.bcp_name=@activity_type or  bcm_bcp_history.bcp_name=@activity_type 
            )
        WHERE activity = @activity_name
        ) x
    END
)  

我也尝试发送ascii和unicode代码,但没有结果。 浏览器-Chrome。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)