Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 无法解决MoveTargetAutofBoundsException的问题:或无法在Firefox上浏览视图_Html_Python 3.x_Selenium_Pycharm_Robotframework - Fatal编程技术网

Html 无法解决MoveTargetAutofBoundsException的问题:或无法在Firefox上浏览视图

Html 无法解决MoveTargetAutofBoundsException的问题:或无法在Firefox上浏览视图,html,python-3.x,selenium,pycharm,robotframework,Html,Python 3.x,Selenium,Pycharm,Robotframework,我尝试了很多选择,但在firefox中无法解决这个问题,我的代码似乎找不到元素,即使它在视图中清晰可见 下面是我的代码(粘贴自变量声明) ''' ***变数*** ${Combo\u box\u Product\u Page\u Enter\u Pincode}=id=Pincode\u field\u id ${邮政编码} ${Combo\u box\u Product\u Page\u Check\u My\u Postcode}=id=checkpin ${Combo\u box\u Pr

我尝试了很多选择,但在firefox中无法解决这个问题,我的代码似乎找不到元素,即使它在视图中清晰可见

下面是我的代码(粘贴自变量声明) ''' ***变数***

${Combo\u box\u Product\u Page\u Enter\u Pincode}=id=Pincode\u field\u id

${邮政编码}

${Combo\u box\u Product\u Page\u Check\u My\u Postcode}=id=checkpin

${Combo\u box\u Product\u Page\u Add\u To\u Cart}=class=single\u Add\u To\u Cart\u按钮

${Combo\u box\u Product\u Page\u Added\u To\u Cart}=class=single\u add\u To\u Cart\u button.button.alt.Added

${Cart\u Icon}=class=woo\u amc\u container\u wrap woo\u amc\u container\u wrap\u right

${Combo\u box\u Product\u Details\u Header}=xpath=/*[@id=“all page Header space”]/div/div[2]/div

${产品数量\u开始}

${产品数量}

${增加数量}=class=qty\u按钮.plus

${Subscription\u单选按钮}=xpath=/*[@id=“subscriptions list”]

${Subscription\u Options}=name=订阅选项

${Subscription\u Interval}

${Window_Width}

${Window_Height}

${Product_Details}=xpath=/html/body/section[5]/div/div[1]/div[2]/div

***关键词***

添加订阅

[Arguments]     ${Number_Of_Products}     ${Subscription_Interval}

Input Text    ${Combo_Boxes_Product_Page_Enter_Pincode}   ${Postcode}

Sleep    1s

Click Element    ${Combo_Boxes_Product_Page_Check_My_Postcode}

Sleep   1s

Set Log Level    Debug
Wait Until Page Contains Element    ${Product_Details}
Click Element At Coordinates    ${Subscription_Radio_Button}  0  0
Select Radio Button    purchase-options   subscription
Sleep    1s
List Selection Should Be    ${Subscription_Options}     ${Subscription_Interval}
FOR  ${Number_Of_Products_Start}    IN    1    ${Number_Of_Products}
     Exit For Loop If    ${Number_Of_Products_Start} == ${Number_Of_Products}
     Click Element    ${Increase_Quantity}
     ${Number_Of_Products_Start} =  Evaluate  ${Number_Of_Products_Start}+1
END
Click Element    ${Combo_Boxes_Product_Page_Add_To_Cart}
Sleep    3s
Wait Until Page Contains Element    ${Combo_Boxes_Product_Page_Added_To_Cart}
Sleep   1s
'''

我收到的错误消息是

09:21:31.324在坐标x=0,y=0处单击元素“xpath=/*[@id=“订阅列表”]”的信息。 09:21:32.190移动目标自动边界失败异常:消息(-4800904)超出视口宽度(1920)和高度(1006)的范围

我还添加了显示该字段清晰可见的屏幕截图。 有人能帮我解决这个问题吗,因为我的整个套间都被耽搁了。 我使用两个屏幕是否导致问题?
我还对该消息感到困惑,它似乎将偏移显示为负值。

为什么要使用“在坐标处单击”作为单选按钮

使用单击元素


Click Element${Subscription\u Radio\u Button}

Hi PDHide,我尝试过单击Element,仅使用select单选按钮,我尝试过在低于单选按钮的位置单击,但都有相同的错误。当我尝试只选择单选按钮时,我得到以下错误-ElementNotInteractivatableException:消息:元素无法滚动到视图添加单选按钮html
Scroll元素到视图中${Subscription_单选按钮
在单击之前尝试此操作,并查看发生的情况。我已尝试将元素滚动到视图中。错误-MoveTargetAutofBoundsException:消息(-4800904)超出了视口宽度(1920)和高度(1006)的范围